> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[EMAIL PROTECTED] On Behalf Of Jon Brock
> Sent: Wednesday, August 29, 2007 12:34 PM
> To: [email protected]
> Subject: zOS Unix DOS2UNIX
> 
> 
> Is there a version of DOS2UNIX that runs on z/OS Unix?  I 
> thought there
> might be one on the "Tools and Toys" page, but it appears not.
> 
> Thanks,
> Jon

What do you want to accomplish? Is the input file in ASCII, or EBCDIC
with trailing ^M (0x0D) characters? I cannot duplicate that program
using normal z/OS UNIX commands (due to IBM's "brain dead" sed compared
to GNU sed). However, if you want to remove all 0x0D characters, even
those in the middle of a line, you can:

tr -d '\015' <input.file >output.file.without.x0d

If you have Perl installed, then this will do what I think you want:

perl -n -i.bak -e 's/\015$//;print' input.file

At the end of this program, input.file will have trailing 0x0d (015
octal) characters removed. The original file will be "input.file.bak".
If you don't want a "backup" file, then:

perl -n -i -e 's/\015$//;print' input.file

will work.



--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to