stanhubble
MIS
I am trying to automate the removal of some chunks of a smb.conf file using awk. I need it to match on some constant text combined with an environment variable. what i have so far:
awk -v pattern="text"$ENVVAR 'BEGIN { RS = "[" }
!/^pattern/ { print "["$0 }' ./smb.conf
i think my problem is the ^ combined with the variable, if i just use hard coded text it works fine.
???
awk -v pattern="text"$ENVVAR 'BEGIN { RS = "[" }
!/^pattern/ { print "["$0 }' ./smb.conf
i think my problem is the ^ combined with the variable, if i just use hard coded text it works fine.
???