Shell scripts and one liners
Wednesday, November 25, 2015
Awk - Print The Field After a Regex Match on a Field
awk
'/regex2match/{for(i=1;i<=NF;++i)if($i~/regex2match/){print $(i+1);break}}'
Thanks to PHV at:
http://www.tek-tips.com/viewthread.cfm?qid=1459823
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment