RE: [LIP] Problem executing scripts Bad Interpreter

Raj Mathur <[email protected]>
Newsgroups gmane.user-groups.linux.india.programmers
Message-ID <[email protected]>
>>>>> "Amar" == Amarendra Godbole <Godbole> writes:

    >> 2. Your scripts have CRLF for newline. Run them through
    >> dos2unix and then try running them. This seems more likely than
    >> (1). Probably you copied your script from a Windows partition,
    >> or FTP'ed the script using

    Amar> And if dos2unix is not around on your machine, use sed, like
    Amar> this: sed -e 's/^M$//' script.sh > /tmp/script.$$ && mv
    Amar> /tmp/script.$$ script.sh

    Amar> The ^M can be obtained by by typing ``ctrl-v ctrl-m'' or
    Amar> ``ctrl-vm''combo.

...or even,

  tr -d '\015' < oldfile > newfile

Of course, that will only work if your file doesn't contain valid ^M's
anywhere except at end of lines.

-- Raju
-- 
Raj Mathur                [email protected]      http://kandalaya.org/
       GPG: 78D4 FC67 367F 40E2 0DD5  0FEF C968 D0EF CC68 D17F
                      It is the mind that moves


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.