![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| compare columns from seven files and print the output | smriti_shridhar | Shell Programming and Scripting | 7 | 06-10-2008 09:22 PM |
| AWK script to print all the columns excpet the one specified | kn.naresh | Shell Programming and Scripting | 3 | 05-22-2008 04:34 AM |
| read input from 2 files and print them in alternate columns | sriram.s | Shell Programming and Scripting | 1 | 02-27-2008 10:12 AM |
| Print lines with search string at specific position | HealthyGuy | Shell Programming and Scripting | 4 | 12-04-2006 05:47 AM |
| Print last 4 columns (variable column #) | Da_Duck | UNIX for Dummies Questions & Answers | 19 | 02-27-2004 06:33 AM |
|
|
Submit Tools | LinkBack | Thread Tools | 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 |
| Forum Sponsor | ||
|
|