All I need is the sed
or awk
code to remove the even numbered lines in a text file. Nothing fancy I just need to remove irrelevant data on the even lines of a text file.
Removing unwanted lines in text file
awksedtext processing
awksedtext processing
All I need is the sed
or awk
code to remove the even numbered lines in a text file. Nothing fancy I just need to remove irrelevant data on the even lines of a text file.
Best Answer
Simply:
for even lines, and
for odd lines.
With the GNU implementation of
sed
, you can also use this syntax:Odd:
Even: