Show only odd lines with cat
Solution 1:
Using awk
: awk 'NR % 2 == 0' filename
Edit: removed {print}
, as shown in ghostdog74's answer and commented on by Roberto Bonvallet.
Solution 2:
Or something like
sed -n 'p;n' filename
For explanation look-up the man page for sed
.
Solution 3:
Use sed:
sed -n 1~2p filename