Dear All,
I m trying to delete two lines at a time in file called 123.txt. Im using sed and based on line numbers i m deleting it and writing it to another file. Follwing i have done.
cat 123.txt | sed '1,5 d' > new
I want to delete line no 1 and 5 at a time, for that i m using sed. But instead it is deleting all the five lines. please help me.
cat -n 123.txt
1 This is the 1 line
2 This is the 2 line
3 This is the 3 line
4
5 My name
Dear All,
Thanks for u r replies. But requirement of line number changes as my script will execute and take some 3 or 4 line numbers at a time. So please help me according to that.