Compare commits

3 Commits

Author SHA1 Message Date
b988c2fac2 add set + IFS 2024-06-11 10:28:46 +02:00
5b6fb4e5c0 suppresion readme 2021-06-21 17:11:40 +02:00
9a9d4f05a3 ajout solution 2021-06-21 17:10:42 +02:00
2 changed files with 11 additions and 7 deletions

View File

@@ -1,7 +0,0 @@
# Gestion des arguments
Écrire un script qui _hello_ prend 1 argument (un nom) en paramètre
dit hello + nom passé en paramètre
et se termine en renvoyant le nb d'arguments reçus

11
hello.sh Normal file
View File

@@ -0,0 +1,11 @@
#! /bin/bash
set -euo pipefail
IFS=$'\n\t'
name=$1
echo hello $name
echo "pensez à faire un echo \$? pour obtenir le code de retour"
exit $#