| Author |
Message |
shemo
Joined: 26 Apr 2002 Posts: 30
|
05 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
|
06 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.
|
|
| Back to top |
|
 |
CatKing
Joined: 05 Jun 2001 Posts: 277 Helped: 1
|
06 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
|
06 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

|
06 Jun 2002 7:27 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
jimjim2k
Joined: 17 May 2001 Posts: 1248 Helped: 11
|
06 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
|
06 Jun 2002 16:27 dos2unix on linux |
|
|
|
|
| Or you meant the reverse operation: unix2dos.....
|
|
| Back to top |
|
 |