Mon dernier script sous linux

#!/bin/bash


if [ $# -eq 0 ] #condition sortie aucun parametre
then
echo "erreur idiot bete" #affichage erreur
exit 1 #code de sortie egal a 1
fi

if [ $# -gt 8 ] #condition le commentaire doit etre inferieur a 8
then
echo trop d\'arguments #affichage de l'erreur
exit 2
fi

min=$1 #variable recevant la valeur minimale
max=$1 #variable recevant la valeur maximale

while [ "$#" -gt 1 ] #boucle tant decale de un parametre
do
shift
if [ "$1" -gt "$max" ]
then
max=$1
fi
if [ "$1" -lt "$min" ]
then
min =$1
fi
done

echo le minimum est $min #affiche la valeur minimale


On m'a un peu aider

# Postato giovedì 09 aprile 2009 03:28

la terminale c'était vraiment pas mal

la terminale c'était vraiment pas mal
Notre routine était peut être ennuyante mais tellement indispensable a mon bien être...

# Postato domenica 18 gennaio 2009 14:24

Que c'est bon

Que c'est bon
Quelle journée alors ...

# Postato domenica 18 gennaio 2009 06:08

Modificato domenica 18 gennaio 2009 06:25

Qui c'est ? ? ? ? ? ?

Qui c'est ?  ?  ?  ?  ?  ?

# Postato giovedì 01 gennaio 2009 13:38

VACACIONES

VACACIONES
[ Aggiungi un commento ] [ Nessun commento ]

# Postato sabato 20 dicembre 2008 13:14

...

Un son pas mal sa vaut le détours
Dj Kaz3y
Booking : 06 11 53 11 83


http://myspace.com/DjKaz3y
...
[ Aggiungi un commento ] [ Nessun commento ]

# Postato domenica 07 dicembre 2008 14:42

Modificato domenica 07 dicembre 2008 15:01