« Script Bash : Les Variables » : différence entre les versions

De www.yakakliker.org
(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 »)
 
Aucun résumé des modifications
 
(2 versions intermédiaires par le même utilisateur non affichées)
Ligne 13 : Ligne 13 :
==== Résultat ====
==== Résultat ====
<syntaxhighlight lang="shell">
<syntaxhighlight lang="shell">
franck@VirtualBox:~/Deploiement$ sh test.sh Bonjour "Tout le monde"
franck@VirtualBox:~/Deploiement$ sh test.sh "Bonjour" "Tout le monde"
Bonjour.Tout le monde
Bonjour.Tout le monde
franck@VirtualBox:~/Deploiement$  
franck@VirtualBox:~/Deploiement$  
Ligne 19 : Ligne 19 :
[[Catégorie:Scripts]]
[[Catégorie:Scripts]]
[[Catégorie:Bash]]
[[Catégorie:Bash]]
‎<html>
<script src='https://storage.ko-fi.com/cdn/scripts/overlay-widget.js'></script>
<script>
  kofiWidgetOverlay.draw('yakakliker', {
    'type': 'floating-chat',
    'floating-chat.donateButton.text': 'Café',
    'floating-chat.donateButton.background-color': '#00b9fe',
    'floating-chat.donateButton.text-color': '#fff'
  });
</script>
‎</html>
‎<html>
<a href="https://www.compteurdevisite.com" title="compteur web gratuit sans pub"><img src="https://counter6.optistats.ovh/private/compteurdevisite.php?c=b4epghealnwlf7wuq7gn3ygll9aywrfx" border="0" title="compteur web gratuit sans pub" alt="compteur web gratuit sans pub"></a>
‎</html>

Dernière version du 17 février 2025 à 18:24

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$


compteur web gratuit sans pub