informatique:bash
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:bash [2024/11/25 14:44] – alexis | informatique:bash [2024/11/25 14:46] (Version actuelle) – alexis | ||
|---|---|---|---|
| Ligne 18: | Ligne 18: | ||
| - [[https:// | - [[https:// | ||
| </ | </ | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | ===== Fonction de conversion des pages de manuel ===== | ||
| - | Dans le fichier '' | ||
| - | <code bash> | ||
| - | man2pdf () { | ||
| - | if whatis ${1} > /dev/null; then | ||
| - | man -Tpdf ${1} > ${1}.pdf | ||
| - | fi | ||
| - | } | ||
| - | </ | ||
| - | |||
| - | ===== Formatage du texte ===== | ||
| - | |||
| - | Pour formater du texte, il faut utiliser des séquences d' | ||
| - | <code bash> | ||
| - | # Notation en ascii | ||
| - | echo -e " | ||
| - | |||
| - | # Notation en octal | ||
| - | echo -e " | ||
| - | |||
| - | # Notation en hexa-décimal | ||
| - | echo -e " | ||
| - | </ | ||
| - | |||
| - | Chaque nombre a une fonction particulière et peut être combiné avec les autres. Cependant, il y a des combinaisons qui n'ont aucun sens. | ||
| - | |||
| - | ^ Ajout d' | ||
| - | ^ Code ^ Effet ^ Code ^ Effet ^ | ||
| - | | 1 | Mettre en gras | 0 | Annuler tous les effets (('' | ||
| - | | 2 | Réduire la luminosité | ||
| - | | 3 | Mettre en italique | ||
| - | | 4 | Souligner avec un trait simple | ||
| - | | 5 | Faire clignoter | ||
| - | | 7 | Inverser les couleurs | ||
| - | | 8 | Cacher | ||
| - | | 9 | Barrer | ||
| - | | 21 | Souligner avec un trait double | ||
| - | | 53 | Surligner avec un trait simple | ||
| - | ^ Couleur du texte |^ Couleur du fond || | ||
| - | ^ Code ^ Effet ^ Code ^ Effet ^ | ||
| - | | 30 | Texte noir | 40 | Fond noir | | ||
| - | | 31 | Texte rouge | 41 | Fond rouge | | ||
| - | | 32 | Texte vert | 42 | Fond vert | | ||
| - | | 33 | Texte jaune | 43 | Fond jaune | | ||
| - | | 34 | Texte bleu | 44 | Fond bleu | | ||
| - | | 35 | Texte violet | ||
| - | | 36 | Texte cyan | 46 | Fond cyan | | ||
| - | | 37 | Texte gris clair | 47 | Fond gris clair | | ||
| - | | 39 | Texte par défaut | ||
| - | | 90 | Texte gris foncé | ||
| - | | 91 | Texte rouge clair | 101 | Fond rouge clair | | ||
| - | | 92 | Texte vert clair | 102 | Fond vert clair | | ||
| - | | 93 | Texte jaune clair | 103 | Fond jaune clair | | ||
| - | | 94 | Texte bleu clair | 104 | Fond bleu clair | | ||
| - | | 95 | Texte violet clair | 105 | Fond violet clair | | ||
| - | | 96 | Texte cyan clair | 106 | Fond cyan clair | | ||
| - | | 97 | Texte blanc | 107 | Fond blanc | | ||
| - | |||
| - | Pour plus d' | ||
| - | * [[https:// | ||
| - | * [[https:// | ||
| - | |||
| - | Voici un script qui permet d' | ||
| - | <code bash bash-color.sh> | ||
| - | # | ||
| - | # Show all the colors of the rainbow, should be run under bash | ||
| - | for STYLE in $(seq 0 9; echo 21 53); do | ||
| - | for FG in $(seq 30 39; seq 90 97); do | ||
| - | for BG in $(seq 40 49; seq 100 107); do | ||
| - | CTRL=" | ||
| - | echo -en " | ||
| - | done | ||
| - | echo | ||
| - | done | ||
| - | echo | ||
| - | done | ||
| - | # Reset | ||
| - | echo -e " | ||
| - | </ | ||
| - | ===== Liens externes ===== | ||
| - | * [[https:// | ||
| - | * [[http:// | ||
| - | * [[http:// | ||
| - | * [[http:// | ||
| - | * [[http:// | ||
| - | * [[http:// | ||
| - | * [[https:// | ||
| - | * [[https:// | ||
| - | * [[https:// | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
informatique/bash.1732574661.txt.gz · Dernière modification : de alexis
