Re: [newbie] executing programs

1999-11-02 Thread Ernest N. Wilcox Jr.

Don't know about the "sh", but try using the full qualified path to the
program. The folder in which the application is located may not be in the
system search path.

HTH,

Ernie


On Sun, 31 Oct 1999,M L Cates wrote:
  | 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



Re: [newbie] executing programs

1999-11-02 Thread Ernest N. Wilcox Jr.

This is second reply. Read the post again. You may have to make the program
executable, unfortunately, I do not know how to do this, as I have never had
the need to do so - I am not a programmer as yet - maybe someday.

Sorry,

Ernie


On Sun, 31 Oct 1999,M L Cates wrote:
  | 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



Re: [newbie] executing programs

1999-11-02 Thread John Aldrich

On Tue, 02 Nov 1999, you wrote:
 This is second reply. Read the post again. You may have to make the program
 executable, unfortunately, I do not know how to do this, as I have never had
 the need to do so - I am not a programmer as yet - maybe someday.
 
"chmod +x" is how you mark something as "executeable." :-)
John



RE: [newbie] executing programs

1999-11-01 Thread Morrell, Mike

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



Re: [newbie] executing programs

1999-11-01 Thread Simon Norris

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




[newbie] executing programs

1999-10-31 Thread M L Cates

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



Re: [newbie] executing programs

1999-10-31 Thread Michael R. Batchelor

M L Cates wrote:
 I have tried typing the name
 of the program in at the prompt and it says "command not found".  

The "current directory" is probably not in your path. try typing

$ ./program_name

Which means run the program right here in this directory.

 I have tried
 to type "sh" before the filename and am told "cannot execute binary file".

That's right. The shell is looking for a list of shell commands.

Michael
-- 
Michael R. Batchelor
Industrial Informatics  Instrumentation, Inc.



Re: [newbie] executing programs

1999-10-31 Thread Matt Stegman

 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]




Re: [newbie] executing programs

1999-10-31 Thread John Aldrich

On Sun, 31 Oct 1999, you wrote:
 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?
 
If you're in the directory with the executeable (make sure it's set
to executeable, otherwise, NOTHING you do is going to make it work
G) type ./program (that's "dot-slash" not just "slash" G)
John