Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

dos2unix on AIX?

5,620 views
Skip to first unread message

GB

unread,
Dec 4, 2000, 3:00:00 AM12/4/00
to
Hopefully a simple question. I can't find the dos2unix utility on AIX
4.3.3. Is there something I didn't install? Do I need a freeware version?
If so, any suggestions?

Thanks, Gord

Entropy Gideoned

unread,
Dec 4, 2000, 7:28:15 PM12/4/00
to
Does dos2unix just change an ascii file from dos format to unix
format?

If it does all you need to do is use sed

sed "s/^M$//" infile > outfile

and use CTRL-V CTRL-M keypresses to generate the ^M

Brock Henry

LAIX Software Consulting

unread,
Dec 4, 2000, 10:16:35 PM12/4/00
to
If you just want to strip off or add carriage returns, you can use sed, awk,
tr, etc. AIX also comes with doswrite and dosread commands that can do this,
though they're more useful for reading and writing dos diskettes from AIX.

Regards,
Paul

Dan Foster

unread,
Dec 5, 2000, 1:23:35 AM12/5/00
to
In article <3a2c361d...@news.optus.net.au>,

Entropy Gideoned <bro...@ozemail.com.au> wrote:
>Does dos2unix just change an ascii file from dos format to unix
>format?
>
>If it does all you need to do is use sed
>
>sed "s/^M$//" infile > outfile
>
>and use CTRL-V CTRL-M keypresses to generate the ^M

or a tr equivalent:

tr -d "\015\032" < inputfile > outputfile

I whipped up a three line sh script with that and named it 'convert-crlf',
dumped it on shell nodes for any shell users who needed it for the occasional
file conversion. Works great.

-Dan

Jonathan Jude

unread,
Dec 5, 2000, 3:00:00 AM12/5/00
to

Hi,

Try TOFRODOS from Christopher Heng :

http://www.thefreecountry.com/

and search on the site for TOFRODOS.

Uses gcc and the gnu make to build it.
Installs in /usr/local/bin and has a manpage.

Regards,

Jonathan

Jerald H. Mathews

unread,
Dec 5, 2000, 3:00:00 AM12/5/00
to
GB <bra...@yahoo.com> wrote:
> Hopefully a simple question. I can't find the dos2unix utility on AIX
> 4.3.3. Is there something I didn't install? Do I need a freeware version?
> If so, any suggestions?

If you really need the dos2unix utility install the "AIX Access for
DOS Users" filesets. I think they are still included on the version
4.3.3 install media but am not sure.

--
Regards,
Jerry M.
Seen on a Tee Shirt, "Never GREP a YACC by the INODE".

0 new messages