How do I print two lines in Linux?

How do I print two lines in Linux?
Answer
With GNU sed , you can print lines 2, 3, 10, etc., using:
sed -n ‘2p;10p; 3p;…’ If you mean you want to print a range of lines then you can use this sed -n 2,4p somefile. txt .
 

Tìm kiếm

Back
Top