I want to delete third line of file named file2. Its running successfully.No Issues with it.
sed '3d' ../log/file2.txt > ../log/file8.txt
Now i want to use variable VAR1
(where VAR1=2
).
I wrote the following command
sed "${VAR1+1}d" ../log/file2.txt > ../log/file8.txt
but this command deleting the 2nd line. No error while executing the command.But I am not getting expected output
Please help me How to use sed in this command to get the correct line to be deleted