![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Converting Binary decimal coded values to Ascii Values | gaur.deepti | UNIX for Advanced & Expert Users | 3 | 04-02-2008 01:33 PM |
| awk/nawk returning decimal values? | moutaye | Shell Programming and Scripting | 1 | 03-25-2008 03:04 PM |
| awk/nawk returning decimal values? | moutaye | SUN Solaris | 1 | 03-25-2008 03:02 PM |
| is it possible to pass external variable values to nawk? | swamymns | Shell Programming and Scripting | 1 | 02-02-2006 06:13 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi ,
i try to filter input file : [565342:00002-00001] 17/04/2008 06:17:09 [983254:00002-00001] 17/04/2008 00:00:02 keeping lines with hour > 06 as : [565342:00002-00001] 17/04/2008 06:17:09 i tried : CSL=06 nawk -v CSL="${CSL}" -F'[ :]' '/^\[/ { if ( $4 -gt $CSL) print $0 } ; /^\>/ { if ( $5 -gt $CSL) print $0 }' input_file.txt i would here give CSL as shell variable the ouput file is the same as input. somebody can remove the straw in my eye ? regards Christian |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|