informatique:system_admin:shell
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| informatique:system_admin:shell [30/03/2011 14:44] – [Shell] cyrille | informatique:system_admin:shell [12/12/2024 11:32] (Version actuelle) – bash howto and tuto cyrille | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ====== Shell ====== | ====== Shell ====== | ||
| - | [[http:// | + | sh, bash |
| - | [[http://www.commentcamarche.net/faq/4801-guide-d-utilisation-du-shell-pour-debutant|Guide d' | + | Bash: |
| + | * [[https://www.baeldung.com/linux/use-command-line-arguments-in-bash-script|How to Use Command Line Arguments in a Bash Script]] | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | **Control Keys**: | ||
| + | * Ctrl-S : Pause Display | ||
| + | * Ctrl-Q : Restart Display | ||
| + | * Ctrl-C : Cancel Operation | ||
| + | * Ctrl-U : Cancel Line | ||
| + | * Ctrl-D : Signal End of File | ||
| + | |||
| + | |||
| + | ===== Commandes ===== | ||
| + | ==== sed ==== | ||
| - | Commande " | ||
| * [[https:// | * [[https:// | ||
| - | > How to match a single quote in sed if the expression is enclosed in single quotes ? | + | > [[http:// |
| >> | >> | ||
| - | >> | + | >> |
| >> | >> | ||
| - | >> | + | >> |
| + | |||
| + | === Remplacer dans un fichier === | ||
| + | |||
| + | pour remplacer | ||
| + | PASSWORD(' | ||
| + | du fichier fichier_entree par | ||
| + | PASSWORD(' | ||
| + | dans fichier_sortie (pas sûr que ce soit ce que tu veux faire), tu dois mettre dans ton script shell | ||
| + | <code bash> | ||
| + | np=' | ||
| + | sed -e " | ||
| + | </ | ||
| Ligne 19: | Ligne 45: | ||
| ==== Redirection flux standard ==== | ==== Redirection flux standard ==== | ||
| + | |||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | tag: stderr, redirect | ||
| Avec linux et windows, pour rediriger la sortie d' | Avec linux et windows, pour rediriger la sortie d' | ||
| Ligne 28: | Ligne 59: | ||
| cat toto.txt > | cat toto.txt > | ||
| </ | </ | ||
| - | + | Ou en utilisant la commande | |
| - | ==== Remplacer dans un fichier ==== | + | |
| - | + | ||
| - | + | ||
| - | pour remplacer | + | |
| - | PASSWORD('horde') | + | |
| - | du fichier fichier_entree par | + | |
| - | PASSWORD('newpass') | + | |
| - | dans fichier_sortie (pas sûr que ce soit ce que tu veux faire), tu dois mettre dans ton script shell | + | |
| <code bash> | <code bash> | ||
| - | np=' | + | cat toto.txt | tee output.log |
| - | sed -e " | + | |
| </ | </ | ||
| + | Un " | ||
| + | <code bash> | ||
| + | command &> file | ||
| + | </ | ||
| ==== Effacer des fichiers selon leur âge ==== | ==== Effacer des fichiers selon leur âge ==== | ||
informatique/system_admin/shell.1301489071.txt.gz · Dernière modification : (modification externe)
