Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stupid problem - can't run script with ./

Status
Not open for further replies.

emilybartholomew

Technical User
Aug 3, 2001
82
US
I am trying to test a unix script, which will eventually be a cron job, using ./ at the command prompt, but computer comes back & says "bash: ./build_current: No such file or directory"

I know I had this problem months & months ago when I first worked on these scripts, but I can't for the life of me remember what the solution is. Any advice?
 
make sure the script is executable:
ls -l ./build_current

if it's not, change the permissions [something like that]:
chmod +x ./build_current

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
&quot;bash: ./build_current: No such file or directory&quot;

you are starting a prog that is not in .
a) and if in the script is a cd somewhere, you loose ./build_current
b) this is a offten stupid error message,if the script calls an interpreter say :
#!/qq/bin/bb
and it cannot find /qq/bin/bb
it will exactly print the message (the wrong one)

set a convenient PATH
 
The file is executable and I have a cd command in the first line.

An import thing I forgot to mention - I am writing the scripts on my windows machine and then uploading them to the unix machine. Is there something I need to do because of that?
 
make sure you ftp/upload in ascii mode

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top