Zizi
asked on
Awk for multiple patterns
Hi,
I am trying to search multiple patterns where I would the start and end of the first few characters. This works for a single pattern.
awk '/test_pattern/ { match($0, /test_pattern/); print substr($0, RSTART - 10, RLENGTH + 20);' file
How do I do it for multiple patterns? Thank you
I am trying to search multiple patterns where I would the start and end of the first few characters. This works for a single pattern.
awk '/test_pattern/ { match($0, /test_pattern/); print substr($0, RSTART - 10, RLENGTH + 20);' file
How do I do it for multiple patterns? Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Welcome.
»bp
»bp
ASKER