> I am trying to learn how to do some C programming and my question is this: How
> do I execute the program after it is compiled?  I have tried typing the name
> of the program in at the prompt and it says "command not found".  I have tried
> to type "sh" before the filename and am told "cannot execute binary file".

First of all, make sure the file has executable permissions.  If it
doesn't, you'll need to add them with `chmod +x a.out` before trying to
run the program.

Second, your current working directory is not in your path.  You'll need
to run the program like `./a.out` to specify that the program is in the
current directory.

> Any help would be appreciated, also, what does the "sh" before a filename do?

That would start up a new instance of the Bourne Shell and execute the
program inside that new shell.

-Matt Stegman
<[EMAIL PROTECTED]>

Reply via email to