Reputation: 442
I want my sed to delete only what I give him.
For exemple, I have this
sed -ie "/$1/d" /etc/asterisk/voicemail.conf &>/dev/null
In the case where my voicemail.conf has some strings like "hello" and "helloc", if my $1 is "hello" that will also remove the line that contains "helloc"
Upvotes: 0
Views: 133
Reputation: 584
Try to use \b
that corresponds to the limit of a word :
sed -ie "/\b$1\b/d" /etc/asterisk/voicemail.conf &>/dev/null
Upvotes: 3