我在Mac OS上使用sed命令,以下为文本。
$ 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
当我运行时:(BSD sed)
$ sed '3,6 {/This/d}' pets.txt
它显示错误:
sed: 1: "3,6 {/This/d}": extra characters at the end of d command
它出什么问题了?当我使用时gsed(GNU sed),效果很好。