electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

Is there a unix equivalent dos2unix utility in linux?


Post new topic  Reply to topic    EDAboard.com Forum Index -> Linux Software -> Is there a unix equivalent dos2unix utility in linux?
Author Message
shemo



Joined: 26 Apr 2002
Posts: 30


Post05 Jun 2002 22:51   

dos2unix sed


I couldn't find it. pls advise.
thanks
Back to top
cdic



Joined: 28 Jun 2001
Posts: 155
Helped: 2
Location: silly valley


Post06 Jun 2002 0:26   

vi dos2unix


just remove all "^M" from your files using vi or sed or other editors. no need using dos2unix, you can write a simple script to implement this. and name dos2linux. Smile
Back to top
CatKing



Joined: 05 Jun 2001
Posts: 277
Helped: 1


Post06 Jun 2002 2:21   

sed dos2unix


Hi, There:
http://ibiblio.org/pub/Linux/utils/text/dos2unix-3.0.tar.gz
Back to top
jimjim2k



Joined: 17 May 2001
Posts: 1248
Helped: 11


Post06 Jun 2002 7:27   

dos2unix linux


Hi

Try this perl script

#!/usr/bin/perl
# convert a dos \r\n format to unix \bn
open (FILE, $ARGV[0]);
while (<FILE>) {
# remove the stupid \r, replace with \n
# some broken editors just put \r
s/\r/\n/g;
# Remove the duplicate \n
s/\n\n/\n/g;
print;
}



tnx
Back to top
Google
AdSense
Google Adsense




Post06 Jun 2002 7:27   

Ads




Back to top
jimjim2k



Joined: 17 May 2001
Posts: 1248
Helped: 11


Post06 Jun 2002 7:35   

linux dos2unix


Hi

BTW:

Look at the following perl link for additional free perl scripts.
It is searchable too.


1. h**p://www.perlmonks.org


* -> t

tnx
Back to top
tdo48



Joined: 13 Jan 2002
Posts: 21


Post06 Jun 2002 16:27   

dos2unix on linux


Or you meant the reverse operation: unix2dos.....
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Linux Software -> Is there a unix equivalent dos2unix utility in linux?
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
UNIX/LINUX (4)
Unix/Linux (12)
is there a lsf equivalent open source tool? (1)
phrack59 - Unix/Linux security (1)
Unix/Linux compatibility question (2)
redirecting stdout in Linux/Unix (1)
does lec pass, if there is inverted-equivalent point? (8)
Free EDA for Linux/UNIX (3)
UNIX an LINUX Books post here (2)
Network Engineer and UNIX/LINUX (5)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS