Find the answer to your Linux question:
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...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just 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

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,387
    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.

  3. #3
    Just 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

  4. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,387
    Try this:
    Code:
    cp -a /bin/newcs ~/newcs_backup
    awk '{ sub(/\r$/,""); print }' ~/newcs_backup > /bin/newcs
    You must always face the curtain with a bow.

  5. #5
    Just 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •