The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-28-2005
Gerry405 Gerry405 is offline
Registered User
  
 

Join Date: Jun 2005
Location: Alexandria, Scotland
Posts: 46
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
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:25 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0