Re: RE: [LIP] Problem executing scripts Bad Interpreter

"Sridhar R" <[email protected]>
Newsgroups gmane.user-groups.linux.india.programmers
Message-ID <[email protected]>
Binand Sethumadhavan said:
> Godbole, Amarendra (GE Consumer & Industrial) posted in
> linux-india-programmers:
>> And if dos2unix is not around on your machine, use sed, like this:
>> sed -e 's/^M$//' script.sh > /tmp/script.$$ && mv /tmp/script.$$
>> script.sh
>
> And if sed is also not available, use perl (in fact, even if sed is
> available, use perl ;). Like this:
>
> perl -pi -e 's/\r//g' filename.txt
>

  And if perl is also not available, use python ;)

  python -c "file('output.sh',
'w').write(file('input.sh').read().replace('\r\n','\n'))"


> Binand [worrying about \r not followed by \n left as an exercise to the
> reader]
>
> --
> [[email protected] root]# uptime
> 11:55am  up 58 days,  4:49,  2 users,  load average: 1023.78, 419.92,
> 158.90
>
>
> -------------------------------------------------------
> 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
> _______________________________________________
> linux-india-programmers mailing list
> linux-india-programmers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/linux-india-programmers
>


/----------------------------------------------|
| R. Sridhar                                   |
| Blog: http://cs.annauniv.edu/~rsridhar/blog/ |
|----------------------------------------------/


-------------------------------------------------------
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.