viernes, 10 de octubre de 2014

Print odd and even lines from a file

sed -n 2~2p filename
will print even-numbered lines from filename
sed -n 1~2p filename
will print odd-numbered lines.

Source: http://unix.stackexchange.com/questions/26723/print-odd-numbered-lines-print-even-numbered-lines

No hay comentarios:

Publicar un comentario