I have written a c program. I want to pipe the program and I want to make it look meaningful. So instead of writing
gcc -o changetext myprog.c
command not found
As I said in a comment, you can either put a dot slash (
./) in front of the executable to run it
Or you put in in a directory that is referenced in the PATH environment variable. A nice explanation of this safety feature can be found here (thanks to rubenvb):
It says that this is more or less to distinguish built-in commands from user-written commands with the same name. I am not convinced though. The shell could simply prefer built-in names to user-supplied ones, and look in the current directory as well as in the PATH.
But this is the *nix way.