Windows linefeed in mec_as2_start/stop.sh scripts

crownedgrouse
crownedgrouse's picture

mec_as2_start.sh and mec_as2_stop.sh contains
Windows line feeds \r\n that create trouble on Linux.

Solution :

mv mec_as2_start.sh mec_as2_start.sh.orig
mv mec_as2_stop.sh mec_as2_stop.sh.orig
cat mec_as2_start.sh.orig | tr -d "\r" > mec_as2_start.sh
cat mec_as2_stop.sh.orig | tr -d "\r" > mec_as2_stop.sh

Enjoy.



amir
there is an easier way

bash-3.00$ dos2unix mec_as2_start.sh
dos2unix: converting file mec_as2_start.sh to UNIX format ...

That's it!



heller
heller's picture
Sorry for this, we created

Sorry for this, we created the scripts on a windows system...

Regards
Heller



crownedgrouse
crownedgrouse's picture
yes

yes but dos2unix package is not basically installed on some Linuxes while 'tr' is :>þ



amir
Bah! :-)

Bah! :-)



crownedgrouse
crownedgrouse's picture
<troll>dos2unix is for newbies !</troll> :>)))))

dos2unix is for newbies ! :>)))))



amir
yep its for newbies

posted it here so the OTHER newbies can use it, not for me of course! *cough*...

Real men prefer sed ;-)




© 1999-2008 mendelson-e-commerce GmbH. All right reserved.