Probléme programmation shell
Fermé
moibibo
Messages postés
2
Date d'inscription
mardi 6 mars 2007
Statut
Membre
Dernière intervention
7 mars 2007
-
7 mars 2007 à 19:38
jipicy Messages postés 40842 Date d'inscription jeudi 28 août 2003 Statut Modérateur Dernière intervention 10 août 2020 - 7 mars 2007 à 23:22
jipicy Messages postés 40842 Date d'inscription jeudi 28 août 2003 Statut Modérateur Dernière intervention 10 août 2020 - 7 mars 2007 à 23:22
A voir également:
- Probléme programmation shell
- Classic shell windows 11 - Télécharger - Personnalisation
- Application de programmation - Guide
- Shell startup windows 10 - Guide
- Programmation logo tortue télécharger - Télécharger - Études & Formations
- Ssh secure shell download - Télécharger - Divers Web & Internet
2 réponses
jipicy
Messages postés
40842
Date d'inscription
jeudi 28 août 2003
Statut
Modérateur
Dernière intervention
10 août 2020
4 897
7 mars 2007 à 23:22
7 mars 2007 à 23:22
Re-
Pour le "OU" tu peux employer ce qui pourrait s'apparenter à un "OU logique", le double-pipe "||" :
Pour ton problème de fonction :
Pour le "OU" tu peux employer ce qui pourrait s'apparenter à un "OU logique", le double-pipe "||" :
#!/bin/bash echo -e "Entrez un chiffre de 1 à 10 : \c" read chiffre if [ "$chiffre" = 2 ] || [ "$chiffre" = 4 ] || [ "$chiffre" = 6 ] ||\ [ "$chiffre" = 8 ] || [ "$chiffre" = 10 ] then echo -e "\nVous avez entrez un chiffre pair.\n" else echo -e "\nVous avez entrez un chiffre impair.\n" fi
Pour ton problème de fonction :
ma_fonction () { ls -l } var=$(ma_fonction) echo "$var";-))
jipicy
Messages postés
40842
Date d'inscription
jeudi 28 août 2003
Statut
Modérateur
Dernière intervention
10 août 2020
4 897
7 mars 2007 à 20:16
7 mars 2007 à 20:16
Salut,
programmation shell batch
C'est du shell bash ou du DOS (batch) ?
programmation shell batch
C'est du shell bash ou du DOS (batch) ?
moibibo
Messages postés
2
Date d'inscription
mardi 6 mars 2007
Statut
Membre
Dernière intervention
7 mars 2007
7 mars 2007 à 20:55
7 mars 2007 à 20:55
c du shell bash