Operating System - HP-UX
1758607 Members
2256 Online
108873 Solutions
New Discussion

Re: commad to remove control M character

 
SOLVED
Go to solution
Cem Tugrul
Esteemed Contributor

Re: commad to remove control M character

Hi Shiv,
cat filename | sed -e "s/[ctrl-v ctrl-m]//" > newfilename

by [ctrl-v ctrl-m] I mean you should hit ctrl-v then ctrl-m between the first and second "/" (slash).

i have tested and it is working...

Good Luck,
Our greatest duty in this life is to help others. And please, if you can't
Raj D.
Honored Contributor

Re: commad to remove control M character

Hi Shiv ,

Simply it can be donw with /usr/bin/dos2ux command,

Ex: If the file name is file1

# cd /usr/bin
# dos2ux file1 > file2

file2 will be result file, which will not have the control characters.

Enjoy,
hth,
Raj
" If u think u can , If u think u cannot , - You are always Right . "