![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
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 |
| convert fixed length file to CSV | tbtbs | Shell Programming and Scripting | 12 | 08-12-2008 09:54 AM |
| how to convert Fixed length file to delimited file. | satyam_sat | Shell Programming and Scripting | 7 | 04-03-2008 02:41 AM |
| convert XML file into Text file(fixed length) | ram2s2001 | Shell Programming and Scripting | 0 | 11-03-2005 01:28 AM |
| Convert delimited to fixed length | nelson553011 | Shell Programming and Scripting | 14 | 10-27-2005 04:04 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Convert a tab delimited/variable length file to fixed length file
Hi, all.
I need to convert a file tab delimited/variable length file in AIX to a fixed lenght file delimited by spaces. This is the input file: 10200002<tab>US$ COM<tab>16/12/2008<tab>2,3775<tab>2,3783 19300978<tab>EURO<tab>16/12/2008<tab>3,28523<tab>3,28657 And this is the expected output: 10200002 US$ COM 16/12/2008 2,3775 2,3783 <<17 SPACES>> 19300978 EURO 16/12/2008 3,28523 3,28657<<17 SPACES>> Thanks, Everton Silveira |
|
||||
|
Another approach:
Code:
awk '{$(NF+17)=""}1' file > outfile
Last edited by Franklin52; 12-19-2008 at 06:29 PM.. Reason: typo |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|