[Samba] Perl file conversion (dos2unix)
lshaw at emitinc.com
Mon Jun 26 19:04:55 GMT 2006
On Thu, 22 Jun 2006, JStrother at ldry.com wrote:
> In samba digest volume 1 #199 there is a post entitled "Plain text file
> transfer problem". In there it states that there is a perl script that
> will do file translations from dos to unix. Would it be possible for me
> to get a copy of that?
You might like this?
perl -pe 's/\r//g' foo.dos.txt > foo.unix.txt
All you have to do to convert a DOS text file to Unix is remove
the carriage returns; that leaves you with linefeeds only,
which is what Unix uses.
More information about the samba