dos2unix equivalent in hpunix

hi,
what is the dos2unix equivalent in hpunix ??

Some alternatives:

awk '{sub(/\r$/,"");print}'

or:

sed 's/.$//'

Regards

hi frank,

we give,

dos2unix <filename> at the prompt

but how to use your solution... can u please explain in detail

Same manner:

awk '{sub(/\r$/,"");print}' filename

or:

sed 's/.$//' filename

Regards

Hi frank,
still i do have the ^M character as the last one in every line ... :frowning:

wat to do ??

ftp the file to a windows machine as a binary file

then ftp it back again as a text file.

hi,

sorry... its AIX and not hp ux .. sorry about this ..

frank,
I tried with your options.. not working

porter,
I did urs too... but :frowning:

wat to do now

Try this on AIX (beware of the backticks):

sed 's/'`echo "\015"`'//g' filename

Regards

An answer of Ygor on a similar thread:

http://www.unix.com/aix/18810-dos2unix-equivalent-aix.html#post72142

was:

dos2aix

Regards

hi frank,

sed 's/'`echo "\015"`'//g' filename - worked

thank you so much :slight_smile:

Ok, your welcome. :wink:

Regards