Script Bash : Les Variables

De www.yakakliker.org
Révision datée du 10 mai 2024 à 17:23 par Administrateur (discussion | contributions) (Page créée avec « === Exemple === <syntaxhighlight lang="bash"> #!/bin/bash export VAR01=$1 export VAR02=$2 echo $VAR01.$VAR02 </syntaxhighlight> ==== Résultat ==== <syntaxhighlight lang="shell"> franck@VirtualBox:~/Deploiement$ sh test.sh Bonjour "Tout le monde" Bonjour.Tout le monde franck@VirtualBox:~/Deploiement$ </syntaxhighlight> Catégorie:Scripts Catégorie:Bash »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)

Exemple

#!/bin/bash

export VAR01=$1
export VAR02=$2

echo $VAR01.$VAR02

Résultat

franck@VirtualBox:~/Deploiement$ sh test.sh Bonjour "Tout le monde"
Bonjour.Tout le monde
franck@VirtualBox:~/Deploiement$