Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #1/bin/bash
- if test $# -ne 1
- then
- echo "Erreur : Entrez un seul paramètre"
- exit 1
- fi
- if test ! -d $1
- then
- echo "Erreur : le paramètre doit être un répertoire "
- exit 2
- fi
- compteur=0
- for fichier in $1
- do
- if test -x $fichier
- then
- echo $fichier
- stat -c %s $fichier
- compteur=`expr $compteur + 1`
- else
- if test ! -s $fichier
- then
- tab=(${tab[*] $fichier)
- rm $fichier
- fi
- fi
- done
- echo "J'ai trouvé $compteur fichiers exécutables "
- echo $tab
- echo ${#tab[*]}
- Max() { # fonction Max (question 8)
- for indice in {0..${#tab[*]}}
- do
- if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement