![]() |
|
|
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 |
| compare columns from seven files and print the output | smriti_shridhar | Shell Programming and Scripting | 7 | 06-11-2008 01:22 AM |
| AWK script to print all the columns excpet the one specified | kn.naresh | Shell Programming and Scripting | 3 | 05-22-2008 08:34 AM |
| read input from 2 files and print them in alternate columns | sriram.s | Shell Programming and Scripting | 1 | 02-27-2008 02:12 PM |
| Print lines with search string at specific position | HealthyGuy | Shell Programming and Scripting | 4 | 12-04-2006 09:47 AM |
| Print last 4 columns (variable column #) | Da_Duck | UNIX for Dummies Questions & Answers | 19 | 02-27-2004 10:33 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Can I search columns and print lines?
Hi. First post here.
I'm relatively new to UNIX (Solaris8) and writing my first real script, but I seem to have hit a brick wall. The odd thing is that it seems like it should be a simple task....but not with UNIX apparently. I've got a large text file: 14000 lines with 10 columns. I want to search the file purely on column 8 for a particular word, but if that word occurs I want to print the whole line. If I 'grep' for the word it will show up in the other columns too, but I'm only interested in occurances in column 8. What I need is something like grep $8 <word> <filename> but of course that command doesn't exist. nawk only deals with columns and won't give me the whole line. Is there any way I can do this? Thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|