salut,

en zsh :

while { old=$line && read line } {
        [[ -z $old  ]] && print $line
} < fichier


en bash :

while old=$line && read line; do
        test -z $old  && echo $line
done < fichier

par contre : si ton fichier est gros, il vaut mieux utiliser awk :

 awk ' { if ( old=="") { print }; old=$0 }' <fichier

cordialement,
mc


--
Lisez la FAQ de la liste avant de poser une question :
http://wiki.debian.net/?DebianFrench Vous pouvez aussi ajouter le mot ``spam'' dans vos champs "From" et
"Reply-To:"

To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Répondre à