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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting LF into a file

Status
Not open for further replies.

josem

Programmer
Dec 7, 2000
4
0
0
US
Hi all,

I need some help with inserting a line feed character to a data file.

Basically, I have a file on a MAC (OS9) which has special characters. When I ftp this file to Unix in Binary mode, and then try to open the file using VI .. I get the message that file cannot be opened as the line is too long !!

I had a quick look at the file by running 'cat -vet filename | pg' to display non-printable control characters and each line had a ^M but no line feed !!

How can I insert a line feed to each line of the data file ??


Thanks in advance.

PS. I do not have perl, so I need a straight Unix solution.
Thanks
 
Try simply sending your text file using ASCII option... that must convert your line endings (LF) in Unix line endings (NL)...

I hope it works...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top