Results 1 to 5 of 5
i am getting this error wen i am running newcs plz help
debian:~# newcs start
-bash: /bin/newcs: /bin/sh^M: bad interpreter: No such file or directory...
- 10-09-2010 #1Just Joined!
- Join Date
- Oct 2010
- Posts
- 2
need help about newcs server in debian
i am getting this error wen i am running newcs plz help
debian:~# newcs start
-bash: /bin/newcs: /bin/sh^M: bad interpreter: No such file or directory
- 10-09-2010 #2
Hi and welcome.
I have no idea, what newcs actually does.
But apparently, it is a shell script, that has been edited and saved with windows style line feeds.
Save it with unix style line feeds and the script might execute further.You must always face the curtain with a bow.
- 10-09-2010 #3Just Joined!
- Join Date
- Oct 2010
- Posts
- 2
thanxx bro for reply can u tell me how can i edit file with linux and wat command,s for save and exit in putty
wen i edit my files in putty i push esc buttun but no work i don,t know plz give me corect command,s thanxx again for reply
- 10-10-2010 #4
Try this:
Code:cp -a /bin/newcs ~/newcs_backup awk '{ sub(/\r$/,""); print }' ~/newcs_backup > /bin/newcsYou must always face the curtain with a bow.
- 10-14-2010 #5Just Joined!
- Join Date
- Oct 2010
- Posts
- 10
tr -d '\r' < path/to/newcss > newcs.backup ; mv newcs.backup newcs
Perl method:
nano -w dos2unix
add:
#!/usr/bin/perl -pi
s/\r\n/\n/;
save --> chmod 755 dos2unix
dos2unix filename
Perl method is more flexible as you have no need to play with temp files.


Reply With Quote
