![]() |
|
|
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 |
| subtitute specific column in line | MomoChan | Shell Programming and Scripting | 11 | 08-26-2008 03:28 AM |
| oneliner:sing SED on a specific column | chaseeem | Shell Programming and Scripting | 8 | 07-15-2008 07:10 AM |
| How to extract first column with a specific character | selamba_warrior | Shell Programming and Scripting | 3 | 05-22-2008 06:14 AM |
| How to read a specific column into variable | victorcheung | Shell Programming and Scripting | 2 | 04-18-2008 02:49 AM |
| Adding blank white sapce at specific column | Jae | Shell Programming and Scripting | 6 | 08-08-2007 09:20 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
|
|
||||
|
how do i parse by specific column?
I have a log file with 13 columns. The 12th column contains the status code (example 200, 404, 500, 403, etc.) I want to remove all 200 status lines. so...
1. remove all the lines in which the 12th column has a 200. 2. display only the lines in which the 12th column shows a 500. Thanks. |
|
||||
|
Quote:
perl -ane 'print if $F[11] eq "500"' temp.txt Note: The -a flag to Perl is "auto-split," which creates an array named F which you can then address by element. |
![]() |
| Bookmarks |
| Tags |
| sed awk |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|