[gull] Afficher Lignes Impaires d'un fichier texte

Galland Gregoire gregoire.galland at hispeed.ch
Tue Mar 7 18:41:38 CET 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.. )

Essaye avec l'operateur modulo (%). Tu fais un modulo 2 sur chaque
chiffre se trouvant au début de la ligne, et l'opération te renverra 1
si c un chiffre impaire.
Greg

>
> le probleme peut se ramener au fait d'afficher une ligne oui, une
> ligne non.
>
>
> _______________________________________________ gull mailing list
> gull at lists.alphanet.ch
> http://lists.alphanet.ch/mailman/listinfo/gull
>


- --
Galland Grégoire
Résidence de la Côte 80
1110 Morges
Natel : 079/511.30.07
Prive1: 021/622.07.37
Privé2: 021/821.15.95 extension:1016
Saitis: 1016
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEDcXRI8gmGeMTr0sRAmusAJ9GB+lFnBKB9JpYNmnRxqxunTOr7QCggu1p
IXu6mEkC8XSvI/2FbeEBxXA=
=jolk
-----END PGP SIGNATURE-----




More information about the gull mailing list