Tagged Questions
3
votes
3answers
288 views
Escaping argument in bash script?
I'm writing a bash script wherein I want to check that one of the arguments passed to it is a valid group.
I have the line
if [ `grep -c -e '\b$2\b' /etc/group` -eq 0 ]; then
echo "Error: $2 is ...