![]() |
|
|
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 |
| Finding the total of a column using awk | ironhead3fan | Shell Programming and Scripting | 8 | 01-30-2009 06:59 AM |
| Deleting column from a flatfile with delimiter | rsprabha | Shell Programming and Scripting | 5 | 10-03-2008 05:18 AM |
| Finding the most common entry in a column | Donkey25 | Shell Programming and Scripting | 12 | 11-22-2007 12:16 PM |
| Adding field of flatfile by an index. | djsal | Shell Programming and Scripting | 2 | 02-14-2007 12:53 PM |
| encrypting Unix flatfile | rkumar28 | UNIX for Dummies Questions & Answers | 1 | 04-29-2004 10:31 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Finding a column in a flatfile
I have a file which is fixed width columns. This is an offset buffer - rather than space or tab delimited. There are upto about 8 columns and I need to get all of the column 5's values into another file.
The problem is that because the delimiter is a space - and some fields are blank - the 5th field is sometimes taken as the 6th - so I lose quite a bit of data. I want to find a way to output just the values from the 50th - 60th positions on the line into another file - for all lines in a large text file. Ideally I'd like to get two columns for each line.....but I imagine that should be easy enough if I can figure out how to get the column I want. I tried " awk -F" " '{print $5 "," $1 }' " - but this gives me the problem...any ideas? ![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|