[Samba] Perl file conversion (dos2unix)

Edmundo Valle Neto edmundo.valle at terra.com.br
Mon Jun 26 19:59:53 GMT 2006

Logan Shaw escreveu:
> 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.
>   - Logan

Some distributions have precompiled packages with tools called 
"todos/fromdos" or "dos2unix/unix2dos" already that is used for that 
type of conversion too.

Edmundo Valle Neto

More information about the samba mailing list