Wednesday, 15 July 2015

cygwin - bash in windows error? -


I'm trying to execute a very simple script with Sagvin:

  #! / Bin / bash \ n "Hi" \ n   

with cygwinpath \ bin \ bash.exe /cygdrive/c/my_path/test.bash

but it says

  /cygdrive/c/my_path/test.bash: line 1: #! / Bin / bash: No such file or directory   

However, it still prints 'hi'.

Why is it, and how to fix it?

Thank you.

The first line of your script just #! / Bin / bash and no #! / Bin / bash \ n

The code is still executing because the title #! / Bin / bash specifies a shell, and there is a command at echo "hi" \ N terminal

For the sake of your problem, let me run the following path in the signin terminal There are no issues using the following:

  / cygdrive / c /    

No comments:

Post a Comment