Shell
Résolu
dino
-
dino -
dino -
Bonjour a tous,
Je commence en shell et je voudrais ecrire un script qui calcule le nbre de repertoir dans le chemin de lancement :
#!/bin/ksh
if [ `ls -ltr|grep '^d'` -ne 0 ];
then echo " il existe `ls -ltr|grep '^d'|wc -l` repertoir "
echo "toto"
fi
Mais a l'execution :
./test1[7]: [: 2: unexpected operator/operand
J'ai beau modifier tjr rien.
Merci pour votre aide.
Je commence en shell et je voudrais ecrire un script qui calcule le nbre de repertoir dans le chemin de lancement :
#!/bin/ksh
if [ `ls -ltr|grep '^d'` -ne 0 ];
then echo " il existe `ls -ltr|grep '^d'|wc -l` repertoir "
echo "toto"
fi
Mais a l'execution :
./test1[7]: [: 2: unexpected operator/operand
J'ai beau modifier tjr rien.
Merci pour votre aide.
A voir également:
- Shell
- Classic shell - Télécharger - Personnalisation
- Ssh secure shell download - Télécharger - Divers Web & Internet
- Shell startup windows 10 - Guide
- Shell infrastructure host c'est quoi - Guide
- Shell do while ✓ - Forum Shell
a+