Sponsored Content
Full Discussion: Better way to do it ?
Top Forums Shell Programming and Scripting Better way to do it ? Post 302950971 by nua7 on Thursday 30th of July 2015 04:13:29 PM
Old 07-30-2015
Better way to do it ?

Hi All,
I have a file with 70 columns which is pipe delimited. I need to search certain values in column 13 and print the record line if it matches.

The following command works, but I think there should be a better way to do this.
Any inputs will be appreciated.

Code:
awk -F "|" '$13=="190" || $13=="191" || $13=="099" || $13=="192" || $13=="193" || $13=="198" || $13=="199" || $13=="298" || $13=="800" {print $0}' $filename > av01

 
All times are GMT -4. The time now is 11:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy