informatique:linux:programmation_shell
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
informatique:linux:programmation_shell [2021/01/22 15:33] – [Les variables] portée des variables pteu | informatique:linux:programmation_shell [2021/02/02 09:08] – [function] pteu | ||
---|---|---|---|
Line 432: | Line 432: | ||
======Les fonctions====== | ======Les fonctions====== | ||
+ | |||
+ | =====function===== | ||
+ | |||
+ | Elles permettent de mutualiser le code afin qu'il soit appeler plusieurs fois sans avoir à le ré-écrire. | ||
+ | <code bash> | ||
+ | function mafonction() { | ||
+ | echo " | ||
+ | } | ||
+ | |||
+ | # appelle de la fonction, plus bas dans le code | ||
+ | mafonction | ||
+ | </ | ||
+ | A l' | ||
+ | |||
+ | La variable bash '' | ||
=====pipe (" | =====pipe (" | ||
Line 933: | Line 948: | ||
* [[http:// | * [[http:// | ||
* https:// | * https:// | ||
+ | * [[https:// |
informatique/linux/programmation_shell.txt · Last modified: 2023/10/02 13:35 by pteu