Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > running shell scripts...

running shell scripts...
Thread Tools
ericw
Guest
Status:
Reply With Quote
Oct 6, 2000, 07:27 AM
 
ok... I feel silly now, but have been unable to successfully execute a fairly simple Bourne Shell script and am frustrated.

Anyway, the script reports "Bourne shell script text" when I call 'file' one it.

It does begin w/ #! bin/sh

Yet, when I go to the directory w/ the shell script, hit
./configure ("configure" being the name of the file), I get
./configure: Command not found.

I'm certain it is a valid Bourne shell script, and it definitely works on other Unices. Is there something I am doing wrong? Could it be a result of it not working with OS X for some reason? The error seems to indicate that it simply doesn't even try to execute the script because it doesn't think it's valid as a script file.

Oh.... I also ran chmod 777 configure, and verified that I have execute permission.

Please help! I guess I am probably missing something simple, but I can't think of it for my life right now. I really want to get this working. I tried running it through bash, too, in the same way and bash reported the same error.


Thanks,
Eric
eaw01998@pomona.edu
     
pope_cerebus
Guest
Status:
Reply With Quote
Oct 6, 2000, 08:15 AM
 
Originally posted by ericw:
ok... I feel silly now, but have been unable to successfully execute a fairly simple Bourne Shell script and am frustrated.

Anyway, the script reports "Bourne shell script text" when I call 'file' one it.

It does begin w/ #! bin/sh

Yet, when I go to the directory w/ the shell script, hit
./configure ("configure" being the name of the file), I get
./configure: Command not found.

I'm certain it is a valid Bourne shell script, and it definitely works on other Unices. Is there something I am doing wrong? Could it be a result of it not working with OS X for some reason? The error seems to indicate that it simply doesn't even try to execute the script because it doesn't think it's valid as a script file.

Oh.... I also ran chmod 777 configure, and verified that I have execute permission.

Please help! I guess I am probably missing something simple, but I can't think of it for my life right now. I really want to get this working. I tried running it through bash, too, in the same way and bash reported the same error.


Thanks,
Eric
eaw01998@pomona.edu
Eric

The 'command not found' be relate to a command in the script, as opposed to the script itself.

It may be the first line, which presuming your message isn't a typo should read :

#!/bin/sh

You had it without the initial '/' which makes it a relative path to the directory that configure is in.

If that was a typo then check the paths for the executables in the script

The pope
     
ericw
Guest
Status:
Reply With Quote
Oct 6, 2000, 04:22 PM
 
oops... that was a typo...

#!/bin/sh

is the first line. What paths should I look for?

Eric
     
ericw
Guest
Status:
Reply With Quote
Oct 8, 2000, 08:38 PM
 
heh... just kidding. turns out one of the foolders it needed wasn't in the right place


Thanks for the suggestion!

eric
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:14 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2