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.
Configuration: Windows XP Firefox 2.0.0.3
A voir également:
- Shell
- Classic shell - Télécharger - Personnalisation
- Ssh secure shell - Télécharger - Divers Web & Internet
- Shell addition ✓ - Forum Shell
- Classic shell c'est quoi ✓ - Forum Windows 10
- Additionner des variables string shell,bash - Forum Programmation
a+