Hi all,
how do you match patterns in an "if-else" fashion?
for example, say I have a set of patterns to match:
/foo/ { print "foo" }
/bar/ { print "bar" }
/.*/ { print "default" }
so for input file:
foo
bar
raboof
I'm getting:
foo
default
bar
default
default
but i would like:
foo
bar...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.