I want to match for a string that contains "/"
I'm using nawk from within a bourne shell script.
the nawk I'm using is:
nawk '$0 ~ /'$class_name*.class'$/ {print $0}'
$class_name could contain a string like:
javax/activation/MimeType
stdin to nawk contains strings with forward slashes.
how do I construct a match in nawk where the string to match, and std, both contain "/"?
here's my error message from nawk:
nawk: syntax error at source line 1
context is
$0 ~ >>> /javax/activation/MimeType*. <<< class$/ {print $0, jar_name}
nawk: bailing out at source line 1
I'm assuming nawk doesn't like the forward slashes.
Thanks in advance for your help and suggestions.
Tom