sh is the common execution syntax used to execute a shell script, not a C
program. Shell scripts are text based programs similar to DOS batch files,
which accounts for your 'cannot execute binary file' message.

The syntax Mike has provided here allow all users to execute all programs
including compiled C programs, if you want to allow only yourself or your
group execution rights, you will need to alter the +x.

----- Original Message -----
From: Morrell, Mike <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 01, 1999 4:32 PM
Subject: RE: [newbie] executing programs


chmod +x filename

-----Original Message-----
From: M L Cates [mailto:[EMAIL PROTECTED]]
Sent: Sunday, October 31, 1999 2:24 PM
To: [EMAIL PROTECTED]
Subject: [newbie] executing programs


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".

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

M L Cates

Reply via email to