print fifth and sixth line of file in linx code example Example: extract every nth line using sed linux fedora $ sed -n '1p;0~3p' input.txt Line 1 Line 3 Line 6