Le Lundi 17 Avril 2006 17:57, ced a écrit : > Bonjour, moi aussi j'ai un petit soucis avec un script : > > > #! /bin/sh > > i=0 > cat "/etc/passwd" | while read ligne ; do > i=$((i + 1)) > done > echo $i > > Voila, il est cencé compter les ligne du fichier /etc/passwd, mais quand > je l'éxécute, il me retourne systématiquement 0. > Si vous voyez pourquoi ca marche po ca serait le top.
i=`wc -l /etc/passwd | cut -f1 -d" "` echo $i -- Florent
pgpDvVDf8NI97.pgp
Description: PGP signature