![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help needed in removing intermediate segments from a pipe delimited segment file | naren_0101bits | Shell Programming and Scripting | 3 | 12-03-2007 07:54 AM |
| To split a string to obtain the words delimited by whitespaces | Sudhakar333 | Shell Programming and Scripting | 4 | 08-06-2007 11:26 AM |
| splitting a pipe delimited file in unix | ddedic | Shell Programming and Scripting | 4 | 03-19-2007 09:16 PM |
| Grep for NULL in a pipe delimited file | sureshg_sampat | Shell Programming and Scripting | 5 | 11-21-2006 02:15 AM |
| Fast way to split a tab delimited file | madhunk | Shell Programming and Scripting | 13 | 05-18-2006 12:36 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
How to split pipe delimited file
I have a pipe delimited input file as below. First byte of the each line indicate the record type. Then i need to split the file based on record_type = null,0,1,2,6 and create 5 files. How do i do this in a ksh script? Pls help
|sl||SL|SL|SL|1996/04/03|1988/09/15|C|A|sl||||*| 0|sl||AX||||SL|1973/04/01|1973/04/01|A|A|sl|||*| 1|sl|RCBH|OR||desc||sl||2008/04/16||A|novel||||RCBH||||||desc|||||*| 2|sl|SL|IA|02||desc||MPL||2008/04/16|A|A|novel|632||BUILDING|1 |N|MAIN|ST||1 N MAIN ST|||*| 6|sl|SL|FL|JD|U31||||||A|B|X|desc||clon8008||BT||2007/12/20|A|A|*| |
| Forum Sponsor | ||
|
|
|
|||
|
Thanks Jim... i have used as you suggested,but getting below errors. I am very new to scripting... pls help
awk: syntax error near line 1 awk: illegal statement near line 1 awk: syntax error near line 2 awk: illegal statement near line 2 awk: syntax error near line 3 awk: illegal statement near line 3 awk: syntax error near line 4 awk: illegal statement near line 4 awk: syntax error near line 5 awk: illegal statement near line |
| Thread Tools | |
| Display Modes | |
|
|