| Ambdós costats versió prèvia Revisió prèvia Següent revisió | Revisió prèvia |
| linux:bash:start [08/01/2021 09:41] – [/bin/bash] mate | linux:bash:start [30/09/2025 02:48] (actual) – [scripting] mate |
|---|
| ~~NOTOC~~ | ~~NOTOC~~ |
| = BASH | = BASH |
| {{tag>linux bash pendiente wiki}} | {{tag>linux pendiente wiki}} |
| |
| == related | == related |
| * [[linux:bash:historyexpansion|]] | * [[linux:bash:historyexpansion|]] |
| * [[linux:bash:shellvariables|]] | * [[linux:bash:shellvariables|]] |
| | * [[linux:bash:ficherosinicio|]] |
| | * [[linux:bash:update-alternatives]] |
| |
| <callout type="info" title="Bash scripting cheatsheet" icon="true">https://devhints.io/bash</callout> | <callout type="info" title="Bash scripting cheatsheet" icon="true">https://devhints.io/bash</callout> |
| == scripting | == scripting |
| <callout type="info" icon="true" title="Guía rápida para principiantes">[[http://es.tldp.org/COMO-INSFLUG/COMOs/Bash-Prog-Intro-COMO/Bash-Prog-Intro-COMO.html]]</callout> | <callout type="info" icon="true" title="Guía rápida para principiantes">[[http://es.tldp.org/COMO-INSFLUG/COMOs/Bash-Prog-Intro-COMO/Bash-Prog-Intro-COMO.html]]</callout> |
| | <callout type="info" icon="true" title="Diferencia entre brackets y dobles brackets">https://www.baeldung.com/linux/bash-single-vs-double-brackets#:~:text=In%20this%20article%2C%20we%20discussed,we%20should%20prefer%20single%20brackets.</callout> |
| |
| * [[linux:bash:estructurasdecontrol|]] | * [[linux:bash:estructurasdecontrol|]] |
| | * <code bash>while true; do read -sk1 "?copiar (n surt): "; if [[ $REPLY != "n" ]]; then scp temperatures.py vmware-sentinel:~/temperatures; else break;fi; done</code> |
| * [[linux:bash:arrays]] | * [[linux:bash:arrays]] |
| * [[linux:bash:indirectreferences]] | * [[linux:bash:indirectreferences]] |
| * [[https://www.cyberciti.biz/programming/improve-your-bashsh-shell-script-with-shellcheck-lint-script-analysis-tool/]] | * [[https://www.cyberciti.biz/programming/improve-your-bashsh-shell-script-with-shellcheck-lint-script-analysis-tool/]] |
| * herramienta chequeo scripts: ''shellcheck'' | * herramienta chequeo scripts: ''shellcheck'' |
| | * Diferencia entre **[** y **%%[[%%** : [[https://www.baeldung.com/linux/bash-single-vs-double-brackets#:~:text=In%20this%20article%2C%20we%20discussed,we%20should%20prefer%20single%20brackets.]] |
| |
| |
| https://www.cyberciti.biz/faq/linux-unix-bash-shell-list-all-builtin-commands/ | https://www.cyberciti.biz/faq/linux-unix-bash-shell-list-all-builtin-commands/ |
| |
| == scripts de inicio | |
| === orden de ejecución al iniciar sesión | |
| ==== proceso de login | |
| ^ # ^ Login Shell ^ Interactive Shell ^ | |
| | 1 | /etc/profile | | | |
| | 2 | ~/.bash_profile | | | |
| | 3 | ~/.bashrc | ~/.bashrc | | |
| | 4 | /etc/bashrc | /etc/bashrc | | |
| |
| al salir: | |
| - ~/.bash_history | |
| - ~/.bash_logout | |
| - /etc/bash_logout | |
| |
| === macintosh | |
| - /etc/profile -> <home>/.bash_profile | |
| - /etc/bashrc -> <home>/.bashrc | |
| |
| - variables de entorno | |
| - variables shell | |
| |
| añadir en /etc/profile: ''source /etc/bashrc''\\ | |
| añadir en <home>/.bash_profile: ''source <home>/.bashrc'' | |
| |
| |