Delete using a different delimiter with Sed

Viewed 11532

Fairly certain I am missing something obvious!

$ cat test.txt
  00 30 * * * /opt/timebomb.sh >> timebomb.log
  01 30 * * * /opt/reincarnate.sh >> reincarnation.log
$ sed ':timebomb:d' test.txt
  00 30 * * * /opt/timebomb.sh >> timebomb.log
  01 30 * * * /opt/reincarnate.sh >> reincarnation.log

whereas

$ sed '/timebomb/d' test.txt
  01 30 * * * /opt/reincarnate.sh >> reincarnation.log

Why is it the case? Aren't a different set of delimiters supported for the d command?

4 Answers
Related