V Viết Mạnh Member Jan 12, 2022 #1 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 .
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 .