Script newbie, so I'm sure I'm missing something obvious here, but how come this simple script does not work?
#!/bin/bash
sed '/$1/,/^$/!d' $2
I make the script executable and run ./script.sh string filename, but nothing happens and I any result at all, even though this works fine in the shell:
sed '/string/,/^$/!d' filename