I have a variable called "num", that holds a number. I want to use it in "sed" like so:
sed '1,$(num)d' file.txt
also tried:
sed '1,($num)d' file.txt
...so that I can delete lines from 1 until the line num
.
It gives me an error like this:
sed: -e expression #1, char 4: unknown command: `('
What is the correct way to do this? thank.