Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

42
bash Normal file
View File

@@ -0,0 +1,42 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# bash
> Bourne-Again SHell, an `sh`-compatible command-line interpreter.
> See also: `zsh`, `histexpand` (history expansion).
> More information: <https://www.gnu.org/software/bash/>.
- Start an interactive shell session:
`bash`
- Start an interactive shell session without loading startup configs:
`bash --norc`
- Execute specific [c]ommands:
`bash -c "{{echo 'bash is executed'}}"`
- Execute a specific script:
`bash {{path/to/script.sh}}`
- E[x]ecute a specific script, printing each command before executing it:
`bash -x {{path/to/script.sh}}`
- Execute a specific script and stop at the first [e]rror:
`bash -e {{path/to/script.sh}}`
- Execute specific commands from `stdin`:
`{{echo "echo 'bash is executed'"}} | bash`
- Start a [r]estricted shell session:
`bash -r`