"bad interpreter: No such file or directory "
After running my shell scripts written in windows. I am getting : "bad interpreter: No such file or directory -"
how can i solve this thing.. I wanna learn linux badly ...help me guys .. Hilfe Hilfe |
Please post the first line of your script. You can use a terminal window and type
Code:
head -n 1 SCRIPT.FILE |
Code:
perl -pi -e 's/\r//g' <scriptname> |
If you use a 'decent' editor in windows, the problem does not occur. I use PFE which can save files in UNIX format. There are other ones as well.
As an alternative, you can make a little sed-script that does the trick (very similar to nx5000's code). |
Guys thanks a lot for replies ..
But still none worked. What i did was : 1. Create a copy of the file . 2.Delete the file. 3. Recreate the file in linux using touch filname. 4.Then vi filename #!/bin/sh :wq 5.Then copy the contents of the old file into this.. 6.Now the shell script works.. |
May I suggest you save yourself a lot of time and just learn vi/vim ? ;-)
|
All times are GMT -5. The time now is 01:38 AM. |