Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to execute shell script in cygwin? [closed]

the name.sh already save in C:\Documents and Settings\user, i type sh name.sh

sh: testing.sh: No such file or directory

any help will be appreciated!

like image 805
lily Avatar asked Mar 17 '11 05:03

lily


2 Answers

You can just type ./name.sh and your script should run.

If your current directory is not in your $PATH, adding the ./ tells the shell to look there.

The other possibility is that you're not currently in the right directory. If the result of pwd shows you are not in C:\Documents and Settings\user, then you will need to cd to that directory, or move the script to whatever directory you are in.

like image 99
Chris Cooper Avatar answered Oct 17 '22 21:10

Chris Cooper


Add ./ in front of the name. ./name.sh

like image 26
detroitpro Avatar answered Oct 17 '22 23:10

detroitpro