OR operator : ||
AND operator: &&
awk -F, '{if ($1=="abc" || $1=="abd") print $0}' InputFile
-F,
InputFile is comma-separated (Field separator F is comma)
if ($1=="abc" || $1=="abd") print $0
Select and print entire record ($0) when first field ($1) is either "abc" or "abd"
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment