I want to write a script that extract lines from line n to m of the input.
doit.sh:
sed -n -e '$1,$2p' input.txt
./doit.sh 3 10
But it gave me an error sed: -e expression #1, char 2: unknown command: `2'. What went wrong?
I want to write a script that extract lines from line n to m of the input.
doit.sh:
sed -n -e '$1,$2p' input.txt
./doit.sh 3 10
But it gave me an error sed: -e expression #1, char 2: unknown command: `2'. What went wrong?