How do I see alternate lines in Unix?

Ngân Lam

New member
How do I see alternate lines in Unix?
Answer
Print every alternate line:
n command prints the current line, and immediately reads the next line into pattern space.
d command
deletes the line present in pattern space. In this way, alternate lines get printed.
 

Tìm kiếm

Back
Top