Skip to content

đŸ§± Fonctions

Auteur : Gautier RAYEROUX | Date : 2026-04-15 00:00:00

Terminal window
my_func() {local name="$1"echo"Hello $name"
}
my_func"John"

local est CRUCIAL dans les fonctions.

Retourner une valeur :

Terminal window
return 1# code retourecho"valeur"# sortie

Récupérer :

Terminal window
result=$(my_func)