![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | 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 !! |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| select vs poll | smanu | IP Networking | 12 | 04-30-2007 02:22 PM |
| reappearing menu list using select | forever_49ers | Shell Programming and Scripting | 9 | 09-13-2006 01:05 PM |
| how to generate a random list from a given list | mskcc | Shell Programming and Scripting | 3 | 05-30-2006 12:30 AM |
| Comparing a distinct value in 1 list with another list | manualvin | Shell Programming and Scripting | 6 | 06-22-2004 03:42 AM |
| select() and read() | jnuno | High Level Programming | 2 | 11-19-2002 10:03 AM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Awk - select from a list
Hi all,
I am trying to select some columns from a file, based on the list of values. Would like to know how best I can achive this. If coulmn 1 has a value of 57 then print the ist column (This works) Code:
awk -F' ' '{if ( $1 == 57 ) {print $1}}' file.txt
Code:
awk -F' ' '{if ( $1 == 57 || $1 == 58) {print $1}}' file.txt
(I could put the 100 values into a file if that makes things easier) Please let me know if you need more information. Any help greatly appreciated. |
| Forum Sponsor | ||
|
|
|
|||
|
vgersh99,
Pardon my ignorance - Just a little clarification needed here. numList and numberList mismatch is a typo or it needs to be that way? Also how do I check for a particular coulmn in the myFile (for example the 14th coulmn). The delimiter is tab in myFile. Thanks for your time. |
|||
| Google UNIX.COM |