Bonjour,
Anthony Assi wrote:
Bonjour,
Comment est-ce que je pourrais afficher les lignes impaires d'un fichier
texte,
sans passer par un script shell,
plutot une combinaisons de commandes Shells ( cat -n, egrep -v, etc.. )
Par exemple avec awk:
Affichage de lignes impaires:
awk '{if (FNR % 2 == 1) {print;}}' filename
Afficahge de lignes paires:
awk '{if (FNR % 2 == 0) {print;}}' filename
--
Gerome Fournier
http://jefke.free.fr
_______________________________________________
gull mailing list
[email protected]
http://lists.alphanet.ch/mailman/listinfo/gull