Quote:
Originally Posted by jlliagre
Depending on the vi clone you are using, the carriage return may or may not be displayed. To be sure, run:
Code:
head -1 scriptFile.sh | od -c | head -1
and check if the output looks like
Code:
0000000 # ! / b i n / s h \n
|
yes, for my case - i got error ": bad interpreter: No such file or directory" when run script. below is the output of command above:
[root@D04 tmp]# head -1 reset.sh | od -c | head -1
0000000 # ! / b i n / b a s h \r \n
there is "\r" there. so i make a new script by copy n paste each of them and it turns to:
[root@D04 tmp]# head -1 reset.sh | od -c | head -1
0000000 # ! / b i n / b a s h \n
now, "bad interpreter" was gone..
--
tganu 2011