Text files

Alexander Dalloz ad+lists at uni-x.org
Thu Feb 24 23:39:53 UTC 2005


Am Fr, den 25.02.2005 schrieb H. Streit um 0:14:

> Okay, one of our programmers wants to start porting over a unix app he 
> wrote to *shudder* windows.  In order to do this, he's mounted his 
> home directory to his windows box via samba, now he's trying to copy 
> over the sourcecode, but he's having that infamous "UNIX-to-DOS text 
> file format" issue (a.k.a LF vs CRLF).  He's trying to write a batch 
> file using gvim to convert all these files...and everything works if 
> you type-out everything at the cmd.exe prompt, but the batch file 
> won't batch...here's what he's got
> 
> gvim -c "set ff=dos" -c "saveas source.i" -c x -<H:\username\src\source.i
> gvim -c "set ff=dos" -c "saveas source.h" -c x -<H:\username\src\source.h
> gvim -c "set ff=dos" -c "saveas source.c" -c x -<H:\username\src\source.c
> 
> any suggestions?

You can do conversion using Linux command line with "unix2dos" binary.
Please see "man unix2dos" for possible parameters. With "dos2unix" you
can do reverse.

cd /path/to/src/directory
for file in ls; do unix2dos ${file}; done

Alexander


-- 
Alexander Dalloz | Enger, Germany | new address - new key: 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora GNU/Linux Core 2 (Tettnang) on Athlon kernel 2.6.10-1.14_FC2smp 
Serendipity 00:35:19 up 3 days, 11:44, load average: 0.61, 0.59, 0.72 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050225/98948d69/attachment-0001.sig>


More information about the fedora-list mailing list