![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CRLF during SFTP transfer is appearing only in one server | panchpan | AIX | 7 | 11-02-2008 08:31 PM |
| how to add CRLF support for CSV file generated in unix | amitpansuria | High Level Programming | 3 | 04-07-2008 02:18 PM |
| Add CRLF is probably simple! | Skyybugg | Shell Programming and Scripting | 1 | 04-05-2007 12:34 PM |
| unix pipe in C | meh | High Level Programming | 1 | 10-16-2006 08:34 PM |
| UNIX Pipe | akrathi | UNIX for Dummies Questions & Answers | 5 | 10-12-2005 05:23 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I am trying to convert a txt file that includes one long string of data. The lines are separated with hex value 7C (for pipe).
I am trying to process this file using SQR (Peoplesoft) so I thought the easiest thing to do would be to replace the eol char with a CRLF in unix so I can just process as a regular text file in sqr. The command I am using below replaces EVERY 7 with a ^M and EVERY C with a line feed. What I need, is to replace '7C' with newline or CRLF. tr '7C' '\r\n' < orig.txt > new.txt I also tried using sed sed "s/7C/\n/g" orig.txt > new.txt but it would only replace 7C with an 'n' and not the line feed that I needed. I have looked at the other threads posted and tried just about all of the suggestions......still no luck so far. Using tr, can I make the 7C LOOK LIKE 1 character somehow instead of 2? If I could, I would just use the new line (\n) to replace it with. I would really appreciate your help :-) Thanks, Sharon Last edited by sfedak; 01-21-2009 at 02:52 PM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|