|
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 09:11 AM.
|