![]() |
|
|
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 |
| parse through one text file and output many | sophiadun | UNIX for Dummies Questions & Answers | 14 | 02-20-2008 06:08 AM |
| delete a field along with delimiter in the whole file | dsravan | Shell Programming and Scripting | 5 | 11-02-2007 01:40 AM |
| Formatting a text file based on newline and delimiter characters | ntekupal | Shell Programming and Scripting | 5 | 05-11-2007 04:33 PM |
| parse text file | craggm | Shell Programming and Scripting | 9 | 02-27-2007 02:13 AM |
| parse text file | klick81 | Shell Programming and Scripting | 3 | 12-18-2006 12:04 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I need some tips to write a unix korn shell script that will parse an input text file. Input text file has messages that span several lines, each field in the message is delimited by /034 and the end of message is delimited by /035.
Input file looks something similar to messge1:field1/034field2/034/n field3/034field4/034field5/034/n field6/034/field7/034/035/n messge2:field1/034field2/034/n field3/034field4/034field5/034/n field6/034/field7/034/035/n I want to write a script to parse the input file that results in an output file similar to messge1:field1,field2,field3,field4,field5,field6,field7/n messge2:field1,field2,field3,field4,field5,field6,field7/n The idea is to convert each message into one single line instead of several lines so that it becomes easier to grep or awk for patterns or fields. Throw in some ideas. |
![]() |
| Bookmarks |
| Tags |
| grep or |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|