I use sed command on mac OS, following is the text.
$ cat pets.txt
This is my cat
my cat's name is betty
This is your dog
your dog's name is frank
This is your fish
your fish's name is george
This is my goat
my goat's name is adam
when I run: (BSD sed)
$ sed '3,6 {/This/d}' pets.txt
It show error:
sed: 1: "3,6 {/This/d}": extra characters at the end of d command
what's wrong with it? when I use gsed(GNU sed)
, it works well.
-i ''
is another problem. – Grijalva