Files
Bash/Arguments-Nombres.sh
T
2026-10-09 07:53:39 +02:00

17 lines
254 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#! /usr/bin/bash
# Test du nombre d’arguments
if [ $# -ne 2 ] ; then
echo "Mauvais nombre d’arguments"
echo "Usage: $0 nb1 nb2"
exit 1
fi
if [[ $1 -gt $2 ]]
then
echo "$1 est plus grand que $2"
else
echo "$2 est plus grand que $1"
fi
exit 0