Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Line Feed?

Status
Not open for further replies.

Geek8

Programmer
Apr 23, 2003
31
US
Dear Experts,
I am totally perplexed by a issue that came up at work today. We have a ASCII file sitting on a Linux box. There are over 900,000 records in that file and each record is 2732 bytes long. I need to add a line feed to each record to show the end. The record then would become 2733 bytes in length. How could I do this successfully? I am sure there has to be a easy way to do this. I can't think of anything.
Second question...If i run the dd command on Linux for converting EBCDIC to ASCII, will this add the linefeed?

Thanks for your help in advance,

Geek8
 
Try

fold -2732 infile > outfile

If you are using dd to convert it from EBCDIC to ASCII you should be able to add

ob=2732

to the dd command to achieve the same thing

CaKiwi

"I love mankind, it's people I can't stand" - Linus Van Pelt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top