![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem using sed for pattern matching | lassimanji | Shell Programming and Scripting | 5 | 04-22-2009 05:42 PM |
| matching file problem | anish19 | Shell Programming and Scripting | 2 | 07-23-2008 12:04 PM |
| pattern matching problem | namishtiwari | Shell Programming and Scripting | 2 | 05-23-2008 08:33 AM |
| pattern matching problem | rein | Shell Programming and Scripting | 8 | 10-27-2007 12:44 AM |
| Problem with pattren Matching | pbsrinivas | Shell Programming and Scripting | 7 | 11-27-2006 04:17 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
AWK matching problem
hi i have a list as follow: Quote:
I tried as follow: Code:
awk '/^aba/ BEGIN{i=0}{if($2==1) i=i+1}END{print i}' file
but i get some errors. If i do: Code:
awk '/^aba/ {print $0}' do
I get the list with all "aba " i think that the problem refers to the BEGIN. Can anyone suggest a solution? Thanks D. |
![]() |
| Bookmarks |
| Tags |
| awk, match |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|