Convert DOS/MAC text files to UNIX text file format
If you want to convert a dos text file with ugly ^M's, you may use following commands;
dos2unix file
fromdos < filein > fileout
sed 's/.$//' filein > fileout
sed 's/.$//' -i file
Some distributions do not include dos2unix, and fromdos/todos commands, but every single of them has sed. And to convert all files in directory 'path';
find path -type f -print -exec sed 's/.$//' -i {} \;
Cheers.
- 0 Comment
- Alper Akcan
- 18 Apr 2008, 16:19
-
You must be login first or sign-up for an account to post comments.
Maybe you should look at these also:
USERBOX
CATEGORIES
MOST READ TODAY
LAST ADDED
- Using iPhone internet sharing over bluetooth under Linux
- Using USB sound card with amarok
- Multi-conditional search and replace (clearing a ftp trojan script example)
- Disabling ipv6 functionality
- How to convert a mp3 file
- How to choose the fastest Debian mirror
- Disabling reverse dns lookups in ssh
- Rewriting destination ip address
- Deleting A File By It's Inode Value
- Learning which libraries are used for a binary
