diff --git a/pages.sh/common/sh.md b/pages.sh/common/sh.md index 60c834875..e3f343c5e 100644 --- a/pages.sh/common/sh.md +++ b/pages.sh/common/sh.md @@ -2,6 +2,7 @@ > Bourne ljuska. > Standardni interpreter komandnog jezika. +> Više informacija: . - Pokreni interaktivnu ljusku: diff --git a/pages/common/bash.md b/pages/common/bash.md index 86baad965..2e6d7657d 100644 --- a/pages/common/bash.md +++ b/pages/common/bash.md @@ -2,32 +2,32 @@ > Bourne-Again SHell, an `sh`-compatible command line interpreter. > See also `histexpand` for history expansion. -> More information: . +> More information: . -- Start interactive shell: +- Start an interactive shell session: `bash` -- Execute a command: +- Execute a command and then exit: `bash -c "{{command}}"` -- Run commands from a file: +- Execute a script: -`bash {{file.sh}}` +`bash {{path/to/script.sh}}` -- Run commands from a file, logging all commands executed to the terminal: +- Execute a script, printing each command before executing it: -`bash -x {{file.sh}}` +`bash -x {{path/to/script.sh}}` -- Run commands from a file, stopping at the first error: +- Execute commands from a script, stopping at the first error: -`bash -e {{file.sh}}` +`bash -e {{path/to/script.sh}}` -- Run commands from stdin: +- Read and execute commands from stdin: `bash -s` -- Print the version information of bash (use `echo $BASH_VERSION` to show just the version without license information): +- Print the Bash version (`$BASH_VERSION` contains the version without license information): `bash --version` diff --git a/pages/common/dash.md b/pages/common/dash.md new file mode 100644 index 000000000..a183bf637 --- /dev/null +++ b/pages/common/dash.md @@ -0,0 +1,28 @@ +# dash + +> Debian Almquist Shell, a modern, POSIX-compliant implementation of `sh` (not Bash-compatible). +> More information: . + +- Start an interactive shell session: + +`dash` + +- Execute a command and then exit: + +`dash -c "{{command}}"` + +- Execute a script: + +`dash {{path/to/script.sh}}` + +- Run commands from a script, printing each command before executing it: + +`dash -x {{path/to/script.sh}}` + +- Execute commands from a script, stopping at the first error: + +`dash -e {{path/to/script.sh}}` + +- Read and execute commands from stdin: + +`dash -s` diff --git a/pages/common/fish.md b/pages/common/fish.md index 5e27268e1..7ed43b387 100644 --- a/pages/common/fish.md +++ b/pages/common/fish.md @@ -1,29 +1,32 @@ # fish -> The Friendly Interactive SHell. -> A command-line interpreter designed to be user friendly. +> The Friendly Interactive SHell, a command-line interpreter designed to be user friendly. > More information: . -- Start interactive shell: +- Start an interactive shell session: `fish` -- Execute a command: +- Execute a command and then exit: `fish -c "{{command}}"` -- Run commands from a file: +- Execute a script: -`fish {{file.fish}}` +`fish {{path/to/script.fish}}` -- Check a file for syntax errors: +- Check a script for syntax errors: -`fish --no-execute {{file.fish}}` +`fish --no-execute {{path/to/script.fish}}` + +- Start an interactive shell session in private mode, where the shell does not access old history or save new history: + +`fish --private` - Display version information and exit: `fish --version` -- Set and export environmental variables that persist across restarts: +- Set and export environmental variables that persist across shell restarts (from within the shell only): `set -Ux {{variable_name}} {{variable_value}}` diff --git a/pages/common/ksh.md b/pages/common/ksh.md index 22c7de247..6b28d4a70 100644 --- a/pages/common/ksh.md +++ b/pages/common/ksh.md @@ -1,21 +1,21 @@ # ksh -> Korn Shell. -> `bash` and `sh`-compatible command line interpreter. +> Korn Shell, a Bash-compatible command line interpreter. +> See also `histexpand` for history expansion. > More information: . -- Start interactive command line interpreter: +- Start an interactive shell session: `ksh` -- Execute a command: +- Execute a command and then exit: -`ksh -c {{command}}` +`ksh -c "{{command}}"` -- Run commands from a file: +- Execute a script: -`ksh {{file}}` +`ksh {{path/to/script.ksh}}` -- Run commands from a file and print them as they are executed: +- Execute a script, printing each command before executing it: -`ksh -x {{file}}` +`ksh -x {{path/to/script.ksh}}` diff --git a/pages/common/rbash.md b/pages/common/rbash.md index b4b1c2fc8..579eeb027 100644 --- a/pages/common/rbash.md +++ b/pages/common/rbash.md @@ -1,20 +1,30 @@ # rbash -> Restricted Bash shell. -> Similar to the `bash` shell with some restrictions like changing directories with `cd`, setting/unsetting of PATH, ENV variables and others. +> Restricted Bash shell, equivalent to `bash --restricted`. +> Does not permit changing the working directory, redirecting command output, or modifying environment variables, among other things. +> See also `histexpand` for history expansion. +> More information: . -- Start rbash: +- Start an interactive shell session: `rbash` -- Execute a command: +- Execute a command and then exit: `rbash -c "{{command}}"` -- Run commands from a file: +- Execute a script: -`rbash {{file.sh}}` +`rbash {{path/to/script.sh}}` -- Print the version information of rbash: +- Execute a script, printing each command before executing it: -`rbash --version` +`rbash -x {{path/to/script.sh}}` + +- Execute commands from a script, stopping at the first error: + +`rbash -e {{path/to/script.sh}}` + +- Read and execute commands from stdin: + +`rbash -s` diff --git a/pages/common/sh.md b/pages/common/sh.md index 7c1085658..3ec5b63e8 100644 --- a/pages/common/sh.md +++ b/pages/common/sh.md @@ -1,20 +1,21 @@ # sh -> Bourne shell. -> The standard command language interpreter. +> Bourne shell, the standard command language interpreter. +> See also `histexpand` for history expansion. +> More information: . -- Start interactive shell: +- Start an interactive shell session: `sh` -- Execute a command: +- Execute a command and then exit: -`sh -c {{command}}` +`sh -c "{{command}}"` -- Run commands from a file: +- Execute a script: -`sh {{file.sh}}` +`sh {{path/to/script.sh}}` -- Run commands from stdin: +- Read and execute commands from stdin: `sh -s` diff --git a/pages/common/zsh.md b/pages/common/zsh.md index 049999939..443108a38 100644 --- a/pages/common/zsh.md +++ b/pages/common/zsh.md @@ -1,21 +1,25 @@ # zsh -> Z SHell, a `bash` and `sh`-compatible command line interpreter. +> Z SHell, a Bash-compatible command line interpreter. > See also `histexpand` for history expansion. > More information: . -- Start interactive command line interpreter: +- Start an interactive shell session: `zsh` -- Execute command passed as parameter: +- Execute a command and then exit: -`zsh -c {{command}}` +`zsh -c "{{command}}"` -- Run commands from file (script): +- Execute a script: -`zsh {{file}}` +`zsh {{path/to/script.zsh}}` -- Run commands from file and print them as they are executed: +- Execute a script, printing each command before executing it: -`zsh -x {{file}}` +`zsh --xtrace {{path/to/script.zsh}}` + +- Start an interactive shell session in verbose mode, printing each command before executing it: + +`zsh --verbose` diff --git a/pages/linux/dash.md b/pages/linux/dash.md deleted file mode 100644 index 2a85bb057..000000000 --- a/pages/linux/dash.md +++ /dev/null @@ -1,20 +0,0 @@ -# dash - -> Debian Almquist Shell. -> Modern POSIX-compliant implementation of `sh` (isn't Bash compatible). - -- Start interactive shell: - -`dash` - -- Execute a command: - -`dash -c "{{command}}"` - -- Run commands from a file: - -`dash {{file.sh}}` - -- Run commands from a file, logging all commands executed to the terminal: - -`dash -x {{file.sh}}`