![]() |
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 |
| What the command to find out the record length of a fixed length file? | tranq01 | UNIX for Dummies Questions & Answers | 9 | 12-04-2008 04:04 PM |
| Creating a file in variable length format | Sarahb29 | UNIX for Dummies Questions & Answers | 2 | 04-22-2008 11:07 AM |
| change record detail...in file | happyv | Shell Programming and Scripting | 5 | 03-12-2007 01:06 AM |
| Parsing a variable length record | Barb | UNIX for Dummies Questions & Answers | 17 | 10-01-2004 08:37 AM |
| creating a fixed length output from a variable length input | r1500 | Shell Programming and Scripting | 2 | 12-03-2003 01:09 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Pivot variable record length file and change delimiter
Hi experts.
I got a file (500mb max) and need to pivot it (loading into ORCL) and change BLANK delimiter to PIPE |. Sometimes there are multipel BLANKS (as a particular value may be BLANK, or simply two BLANKS instead of one BLANK). thanks for your input! Cheers, Layout <id>BLANK<record_type>BLANK<field_num>BLANK<field_value>BLANK<field_num> BLANK<field_value>BLANK ........\n example: (005, 004 are record_type, one leading for each line, same with <id>) 1234 005 001 23 198 5 098 45 033 2.........090 12\n 1234 006 008 66 002 345 129 2 345 2 897 45 091 56788 123 56321 443 45.........100 33\n I want to use awk to "massage" this file to this output: <record_type> <field_num> <field_value> <record_type> <field_num> <field_value> Example: 1234|005|001|23\n 1234|005|198|5\n 1234|005|098|45\n 1234|005|033|2\n ... 1234|005|090|12\n 1234|006|008|66\n 1234|006|002|345\n 1234|006|129|2\n 1234|006|345|2\n 1234|006|897|45\n 1234|006|091|56788\n 1234|006|443|45\n .... 1234|006|100|33\n |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|