![]() |
|
|
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 |
| how to access values of awk/nawk variables outside the awk/nawk block? | saniya | Shell Programming and Scripting | 5 | 05-13-2008 08:37 AM |
| nawk & awk | sd12 | UNIX for Advanced & Expert Users | 5 | 05-05-2008 11:46 AM |
| nawk/ksh help | DeltaX | Shell Programming and Scripting | 0 | 03-06-2008 03:54 PM |
| nawk -v to awk | kamel.seg | Shell Programming and Scripting | 2 | 12-18-2007 07:30 AM |
| nawk | whatisthis | Shell Programming and Scripting | 3 | 09-29-2004 02:44 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
help with Awk or nawk
Can anyone explain to me why the first line doesn't work and the second seems to work fine. I am trying to find all occurances of text within a certain column (col 13) that start with the character V, I suppose it sounds simple but I have tried using the following but don't really understand what the periods are actually doing.
So the first line doesn't work yet the second does seem to...whats the difference...in laymans terms please awk '{if ($13 ~ ".*V.") print}' text.file > newtext.file awk '{if ($13 ~ ".*V.*..") print}' text.file head text.file SG99891970 G405H 25/10/05 29/10/05 C8 11 10 27/12/74 2712742214 31620 AB42 3JD VW01A SG99926485 G405H 10/11/05 12/11/05 A1 36 10 01/11/80 0111802040 31620 AB42 5WA VW10 SG03130444 G405H 17/07/05 24/07/05 A1 36 10 18/09/27 blank 99995 CA11 7UF VW17 SG03130444 G405H 24/07/05 11/08/05 A1 18 43 18/09/27 blank 99995 CA11 7UF VW17 SG03144116 G405H 12/11/05 14/11/05 A1 36 10 10/05/84 blank 99961 DD3 0NH SW06 SG03128794 G405H 05/10/05 07/10/05 C8 11 10 22/07/53 blank 18343 DG1 1TQ VWD Last edited by Gerry405; 11-28-2005 at 01:11 PM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|