1755662 Members
3586 Online
108837 Solutions
New Discussion юеВ

Re: dos2unix command

 
SOLVED
Go to solution
Shivkumar
Super Advisor

dos2unix command

Hey Guys,

There was a command "dos2unix" to convert windows created text/ascii files into unix format on some non HP-UX.

I am not sure whether similar command exist on hpux 11i.

Can someone point out on this ?

Thanks in advance.
Shiv

7 REPLIES 7
Robert-Jan Goossens
Honored Contributor
Solution

Re: dos2unix command

Hi,

check the man pages of dos2ux/ux2dos, dos2unix is solaris.

Regards,
Robert-Jan
Paul Ettema
Advisor

Re: dos2unix command

Shiv,

On HP-UX 11i (HP-UX sysname B.11.11 U 9000/800)you find dos2ux and ux2dos in directory: /usr/bin/

Paul.
Torsten.
Acclaimed Contributor

Re: dos2unix command

Another nice document, answers not only this question:

http://h20331.www2.hp.com/Hpsub/cache/288622-0-0-225-121.html

HP-UX Solaris command mapping

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Hemmetter
Esteemed Contributor

Re: dos2unix command

Hi Shiv,


install recode e.g from:
http://hpux.asknet.de/hppd/hpux/Gnu/recode-3.6/


try
# recode lat1..IBM-PC/CR-LF




rgds
HGH
Hein van den Heuvel
Honored Contributor

Re: dos2unix command

If you can not find the command, or need to process a file on windows/dos, then in a pinch you can roll your own with perl:

ux2dos:
$ perl -pe 'chomp;$_.="\r\n"' tmp.ux > x.dos

dos2ux:
$ perl -pe 's/\r$//' tmp.dos > tmp.ux

fwfw,
Hein.
James R. Ferguson
Acclaimed Contributor

Re: dos2unix command

Hi Folks:

Why resurrect a 2+ year old thread when it already had a solution?!

Regards!

...JRF...
Hein van den Heuvel
Honored Contributor

Re: dos2unix command

Good question James!

I guess Paul made us do it?!

Sorry 'bout that, I normally pay attention to the dates and try to avoid redundant replies.

Hein.

Hoi Paul, had je niet gezien dat er al een oplossing was? Groetjes, Hein.