mirror of
https://github.com/flokoe/bash-hackers-wiki.git
synced 2024-11-01 14:53:06 +01:00
Fix formatting for Markdown and remove old content
This commit is contained in:
parent
b663bff94b
commit
d24eb8b212
516
docs/index.md
516
docs/index.md
@ -1,56 +1,45 @@
|
|||||||
[](bash4) \~\~DISCUSSION:off\~\~
|
---
|
||||||
|
# hide: [navigation]
|
||||||
|
tags:
|
||||||
|
- bash
|
||||||
|
- shell
|
||||||
|
- linux
|
||||||
|
- scripting
|
||||||
|
---
|
||||||
|
|
||||||
# The Bash Hackers Wiki
|
# The Bash Hackers Wiki
|
||||||
|
|
||||||
![](keywords>bash shell linux scripting)
|
This wiki is intended to hold documentation of any kind about GNU Bash.
|
||||||
|
The main motivation was to provide *human-readable documentation* and information so users aren't forced to read every bit of the Bash manpage - which can be difficult to understand.
|
||||||
|
However, the docs here are **not** meant as a newbie tutorial.
|
||||||
|
|
||||||
Come visit us at <ircs://irc.libera.chat:6697> #bash ! \~ormaaj
|
This wiki and any programs found in this wiki are free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
\<WRAP center round box 90%\> This wiki is intended to hold
|
This wiki and its programs are distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
documentation of any kind about GNU Bash. The main motivation was to
|
See the GNU General Public License for more details.
|
||||||
provide *human-readable documentation* and information so users aren\'t
|
|
||||||
forced to read every bit of the Bash manpage - which can be difficult to
|
|
||||||
understand. However, the docs here are **not** meant as a newbie
|
|
||||||
tutorial.
|
|
||||||
|
|
||||||
This wiki and any programs found in this wiki are free software: you can
|
You should have received a copy of the GNU General Public License along with this program.
|
||||||
redistribute it and/or modify it under the terms of the GNU General
|
If not, see [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).
|
||||||
Public License as published by the Free Software Foundation, either
|
|
||||||
version 3 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This wiki and its programs are distributed in the hope that it will be
|
[What would YOU like to see here?](wishes) (outdated and locked, please use the discussions)
|
||||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
||||||
Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along
|
**Stranger!** Feel free to comment or edit the contents on GitHub.
|
||||||
with this program. If not, see \<<http://www.gnu.org/licenses/>\>.
|
There is a [Bash Hackers Wiki needs love page](/meta/need_love) that lists some things to do.
|
||||||
|
|
||||||
[What would YOU like to see here?](wishes) (outdated and locked, please
|
|
||||||
use the discussions)
|
|
||||||
|
|
||||||
**Stranger!** [Feel free to
|
|
||||||
register](http://wiki.bash-hackers.org/start&do=register) and comment or
|
|
||||||
edit the contents. There is a [Bash Hackers Wiki needs love
|
|
||||||
page](/meta/need_love) that lists some things to do. The registration is
|
|
||||||
only there to prevent SPAM. \</WRAP\>
|
|
||||||
|
|
||||||
## Scripting and general information
|
## Scripting and general information
|
||||||
|
|
||||||
- [Bash v4 - a rough overview](bash4) (unmaintained, since Bash 4 is
|
- [Bash v4 - a rough overview](bash4) (unmaintained, since Bash 4 is more or less standard)
|
||||||
more or less standard)
|
- [style](/scripting/style) – an assorted collection of style and optic hints
|
||||||
- [style](/scripting/style) \-- an assorted collection of style and
|
- [basics](/scripting/basics)
|
||||||
optic hints
|
- [newbie_traps](/scripting/newbie_traps)
|
||||||
- [basics](/scripting/basics)
|
- [bashbehaviour](/scripting/bashbehaviour)
|
||||||
- [newbie_traps](/scripting/newbie_traps)
|
- [posparams](/scripting/posparams)
|
||||||
- [bashbehaviour](/scripting/bashbehaviour)
|
- [processtree](/scripting/processtree)
|
||||||
- [posparams](/scripting/posparams)
|
- [obsolete](/scripting/obsolete)
|
||||||
- [processtree](/scripting/processtree)
|
- [nonportable](/scripting/nonportable)
|
||||||
- [obsolete](/scripting/obsolete)
|
- [debuggingtips](/scripting/debuggingtips)
|
||||||
- [nonportable](/scripting/nonportable)
|
- [terminalcodes](/scripting/terminalcodes)
|
||||||
- [debuggingtips](/scripting/debuggingtips)
|
- [tutoriallist](/scripting/tutoriallist)
|
||||||
- [terminalcodes](/scripting/terminalcodes)
|
|
||||||
- [tutoriallist](/scripting/tutoriallist)
|
|
||||||
|
|
||||||
## Code snippets
|
## Code snippets
|
||||||
|
|
||||||
@ -58,347 +47,216 @@ There is a [section that holds small code snippets](/snipplets/start).
|
|||||||
|
|
||||||
See also [some Bash source code excerpts](/misc/readthesourceluke).
|
See also [some Bash source code excerpts](/misc/readthesourceluke).
|
||||||
|
|
||||||
## How to\....
|
## How to
|
||||||
|
|
||||||
[Doing specific tasks: concepts, methods, ideas](/howto/start):
|
[Doing specific tasks: concepts, methods, ideas](/howto/start):
|
||||||
|
|
||||||
- [Simple locking (against parallel run)](/howto/mutex)
|
- [Simple locking (against parallel run)](/howto/mutex)
|
||||||
- [Rudimentary config files for your scripts](/howto/conffile)
|
- [Rudimentary config files for your scripts](/howto/conffile)
|
||||||
- [Editing files with ed(1)](/howto/edit-ed)
|
- [Editing files with ed](/howto/edit-ed)
|
||||||
- [Collapsing Functions](/howto/collapsing_functions)
|
- [Collapsing Functions](/howto/collapsing_functions)
|
||||||
- [Illustrated Redirection Tutorial](/howto/redirection_tutorial)
|
- [Illustrated Redirection Tutorial](/howto/redirection_tutorial)
|
||||||
- [Calculate with dc(1)](/howto/calculate-dc)
|
- [Calculate with dc](/howto/calculate-dc)
|
||||||
- [Introduction to pax - the POSIX archiver](/howto/pax)
|
- [Introduction to pax - the POSIX archiver](/howto/pax)
|
||||||
- [getopts_tutorial](/howto/getopts_tutorial) (*under construction!*)
|
- [getopts_tutorial](/howto/getopts_tutorial) (*under construction!*)
|
||||||
- [dissectabadoneliner](/howto/dissectabadoneliner) An example of a
|
- [dissectabadoneliner](/howto/dissectabadoneliner) An example of a bad oneliner, breakdown and fix (by `kojoro`)
|
||||||
bad oneliner, breakdown and fix (by `kojoro`)
|
- [Write tests for ./your-script.sh](/howto/testing-your-scripts) by using bashtest util
|
||||||
- [Write tests for ./your-script.sh](/howto/testing-your-scripts) by
|
|
||||||
using bashtest util
|
|
||||||
|
|
||||||
## Bash syntax and operations
|
## Bash syntax and operations
|
||||||
|
|
||||||
- [Bash features overview by version](/scripting/bashchanges)
|
- [Bash features overview by version](/scripting/bashchanges)
|
||||||
- [Basic grammar rules](/syntax/basicgrammar)
|
- [Basic grammar rules](/syntax/basicgrammar)
|
||||||
- [Quoting and character escaping](/syntax/quoting)
|
- [Quoting and character escaping](/syntax/quoting)
|
||||||
- [Parsing and execution](/syntax/grammar/parser_exec)
|
- [Parsing and execution](/syntax/grammar/parser_exec)
|
||||||
- [Some words about words\...](/syntax/words)
|
- [Some words about words...](/syntax/words)
|
||||||
- [Patterns and pattern matching](/syntax/pattern)
|
- [Patterns and pattern matching](/syntax/pattern)
|
||||||
- [Arithmetic expressions](/syntax/arith_expr)
|
- [Arithmetic expressions](/syntax/arith_expr)
|
||||||
- [List of shell options](/internals/shell_options)
|
- [List of shell options](/internals/shell_options)
|
||||||
- [Redirection](/syntax/redirection)
|
- [Redirection](/syntax/redirection)
|
||||||
- [Special parameters and shell variables](/syntax/shellvars)
|
- [Special parameters and shell variables](/syntax/shellvars)
|
||||||
- [Arrays](/syntax/arrays)
|
- [Arrays](/syntax/arrays)
|
||||||
|
|
||||||
\<WRAP column 40%\> ***[Compound commands]{.underline}***
|
## Compound commands
|
||||||
|
|
||||||
**[Compound commands overview](/syntax/ccmd/intro)**
|
| [Compound commands overview](/syntax/ccmd/intro) | |
|
||||||
------------------------------------------------------ ------------------------------------------------------------------
|
| ------------------------------------------------ | ---------------------------------------------------------------- |
|
||||||
Grouping
|
| **Grouping** | |
|
||||||
`{ ...; }` [command grouping](/syntax/ccmd/grouping_plain)
|
| `{ ...; }` | [command grouping](/syntax/ccmd/grouping_plain) |
|
||||||
`( ... )` [command grouping in a subshell](/syntax/ccmd/grouping_subshell)
|
| `( ... )` | [command grouping in a subshell](/syntax/ccmd/grouping_subshell) |
|
||||||
Conditionals
|
| **Conditionals** | |
|
||||||
`[[ ... ]]` [conditional expression](/syntax/ccmd/conditional_expression)
|
| `[[ ... ]]` | [conditional expression](/syntax/ccmd/conditional_expression) |
|
||||||
`if ...; then ...; fi` [conditional branching](/syntax/ccmd/if_clause)
|
| `if ...; then ...; fi` | [conditional branching](/syntax/ccmd/if_clause) |
|
||||||
`case ... esac` [pattern-based branching](/syntax/ccmd/case)
|
| `case ... esac` | [pattern-based branching](/syntax/ccmd/case) |
|
||||||
Loops
|
| **Loops** | |
|
||||||
`for word in ...; do ...; done` [classic for-loop](/syntax/ccmd/classic_for)
|
| `for word in ...; do ...; done` | [classic for-loop](/syntax/ccmd/classic_for) |
|
||||||
`for ((x=1; x<=10; x++)); do ...; done` [C-style for-loop](/syntax/ccmd/c_for)
|
| `for ((x=1; x<=10; x++)); do ...; done` | [C-style for-loop](/syntax/ccmd/c_for) |
|
||||||
`while ...; do ...; done` [while loop](/syntax/ccmd/while_loop)
|
| `while ...; do ...; done` | [while loop](/syntax/ccmd/while_loop) |
|
||||||
`until ...; do ...; done` [until loop](/syntax/ccmd/until_loop)
|
| `until ...; do ...; done` | [until loop](/syntax/ccmd/until_loop) |
|
||||||
Misc
|
| **Misc** | |
|
||||||
`(( ... ))` [arithmetic evaluation](/syntax/ccmd/arithmetic_eval)
|
| `(( ... ))` | [arithmetic evaluation](/syntax/ccmd/arithmetic_eval) |
|
||||||
`select word in ...; do ...; done` [user selections](/syntax/ccmd/user_select)
|
| `select word in ...; do ...; done` | [user selections](/syntax/ccmd/user_select) |
|
||||||
|
|
||||||
\</WRAP\>
|
## Expansions and substitutions
|
||||||
|
|
||||||
\<WRAP column 40%\> ***[Expansions and substitutions]{.underline}***
|
| [Introduction to expansions and substitutions](/syntax/expansion/intro) | |
|
||||||
|
| ------------------------------------------------------------------------| ---------------------------------------------------- |
|
||||||
**[Introduction to expansions and substitutions](/syntax/expansion/intro)**
|
| `{A,B,C} {A..C}` | [Brace expansion](/syntax/expansion/brace) |
|
||||||
----------------------------------------------------------------------------- ------------------------------------------------------
|
| `~/ ~root/` | [Tilde expansion](/syntax/expansion/tilde) |
|
||||||
`{A,B,C} {A..C}` [Brace expansion](/syntax/expansion/brace)
|
| `$FOO ${BAR%.mp3}` | [Parameter expansion](/syntax/pe) |
|
||||||
`~/ ~root/` [Tilde expansion](/syntax/expansion/tilde)
|
| `` `command` $(command) `` | [Command substitution](/syntax/expansion/cmdsubst) |
|
||||||
`$FOO ${BAR%.mp3}` [Parameter expansion](/syntax/pe)
|
| `<(command) >(command)` | [Process substitution](/syntax/expansion/proc_subst) |
|
||||||
`` `command` $(command) `` [Command substitution](/syntax/expansion/cmdsubst)
|
| `$((1 + 2 + 3)) $[4 + 5 + 6]` | [Arithmetic expansion](/syntax/expansion/arith) |
|
||||||
`<(command) >(command)` [Process substitution](/syntax/expansion/proc_subst)
|
| `Hello <---> Word!` | [Word splitting](/syntax/expansion/wordsplit) |
|
||||||
`$((1 + 2 + 3)) $[4 + 5 + 6]` [Arithmetic expansion](/syntax/expansion/arith)
|
| `/data/*-av/*.mp?` | [Pathname expansion](/syntax/expansion/globs) |
|
||||||
`Hello <---> Word!` [Word splitting](/syntax/expansion/wordsplit)
|
|
||||||
`/data/*-av/*.mp?` [Pathname expansion](/syntax/expansion/globs)
|
|
||||||
|
|
||||||
\</WRAP\> \<WRAP clear\>\</WRAP\>
|
|
||||||
|
|
||||||
## Builtin Commands
|
## Builtin Commands
|
||||||
|
|
||||||
This is a selection of builtin commands and command-like keywords,
|
This is a selection of builtin commands and command-like keywords, loosely arranged by their common uses.
|
||||||
loosely arranged by their common uses. These are provided directly by
|
These are provided directly by the shell, rather than invoked as standalone external commands.
|
||||||
the shell, rather than invoked as standalone external commands.
|
|
||||||
|
|
||||||
\<WRAP column 46%\>
|
### Declaration commands
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
!!! note
|
||||||
Declaration commands\ Alt Type
|
Commands that set and query attributes/types, and manipulate simple datastructures.
|
||||||
\<wrap center round lo todo box 80%\>Commands that set and query attributes/types, and manipulate simple datastructures.\</wrap\>
|
|
||||||
--------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------ -------------- -----------------
|
|
||||||
[declare](/commands/builtin/declare) Display or set shell variables or functions along with attributes. `typeset` builtin
|
|
||||||
|
|
||||||
[export](/commands/builtin/export) Display or set shell variables, also giving them the export attribute. `typeset -x` special builtin
|
| Command | Description | Alt | Type |
|
||||||
|
| -------------------------------------- | ---------------------------------------------------------------------- | ------------ | --------------- |
|
||||||
|
| [declare](/commands/builtin/declare) | Display or set shell variables or functions along with attributes. | `typeset` | builtin |
|
||||||
|
| [export](/commands/builtin/export) | Display or set shell variables, also giving them the export attribute. | `typeset -x` | special builtin |
|
||||||
|
| [eval](/commands/builtin/eval) | Evaluate arguments as shell code. | | special builtin |
|
||||||
|
| [local](/commands/builtin/local) | Declare variables as having function local scope. | | builtin |
|
||||||
|
| [readonly](/commands/builtin/readonly) | Mark variables or functions as read-only. | `typeset -r` | special builtin |
|
||||||
|
| [unset](/commands/builtin/unset) | Unset variables and functions. | | special builtin |
|
||||||
|
| [shift](/commands/builtin/shift) | Shift positional parameters | | special builtin |
|
||||||
|
|
||||||
[eval](/commands/builtin/eval) Evaluate arguments as shell code. \- special builtin
|
### IO
|
||||||
|
|
||||||
[local](/commands/builtin/local) Declare variables as having function local scope. \- builtin
|
!!! note
|
||||||
|
Commands for reading/parsing input, or producing/formatting output of standard streams.
|
||||||
|
|
||||||
[readonly](/commands/builtin/readonly) Mark variables or functions as read-only. `typeset -r` special builtin
|
| Command | Description | Alt | Type |
|
||||||
|
| ------------------------------------ | ---------------------------------------------------------------------- | ----------- | ---------|
|
||||||
|
| [coproc](/syntax/keywords/coproc) | Co-processes: Run a command in the background with pipes for reading / writing its standard streams. | | keyword |
|
||||||
|
| [echo](/commands/builtin/echo) | Create output from arguments. | | builtin |
|
||||||
|
| [mapfile](/commands/builtin/mapfile) | Read lines of input into an array. | `readarray` | builtin |
|
||||||
|
| [printf](/commands/builtin/printf) | "advanced `echo`" | | builtin |
|
||||||
|
| [read](/commands/builtin/read) | Read input into variables or arrays, or split strings into fields using delimiters. | | builtin |
|
||||||
|
|
||||||
[unset](/commands/builtin/unset) Unset variables and functions. \- special builtin
|
### Configuration and Debugging
|
||||||
|
|
||||||
[shift](/commands/builtin/shift) Shift positional parameters \- special builtin
|
!!! note
|
||||||
|
Commands that modify shell behavior, change special options, assist in debugging.
|
||||||
|
|
||||||
I/O\ Alt Type
|
| Command | Description | Alt | Type |
|
||||||
\<wrap center round lo todo box 80%\>Commands for reading/parsing input, or producing/formatting output of standard streams.\</wrap\>
|
| ---------------------------------- | ----------------------------------------------------------------------------- | --- | --------------- |
|
||||||
|
| [caller](/commands/builtin/caller) | Identify/print execution frames. | | builtin |
|
||||||
|
| [set](/commands/builtin/set) | Set the positional parameters and/or set options that affect shell behaviour. | | special builtin |
|
||||||
|
| [shopt](/commands/builtin/shopt) | set/get some bash-specific shell options. | | builtin |
|
||||||
|
|
||||||
[coproc](/syntax/keywords/coproc) Co-processes: Run a command in the background with pipes for reading / writing its standard streams. \- keyword
|
### Control flow and data processing
|
||||||
|
|
||||||
[echo](/commands/builtin/echo) Create output from arguments. \- builtin
|
!!! note
|
||||||
|
Commands that operate on data and/or affect control flow.
|
||||||
|
|
||||||
[mapfile](/commands/builtin/mapfile) Read lines of input into an array. `readarray` builtin
|
| Command | Description | Alt | Type |
|
||||||
|
| --------------------------------------------------- | ---------------------------------------------------- | -------- | --------------- |
|
||||||
|
| [colon](/commands/builtin/true) | "true" null command. | `true` | special builtin |
|
||||||
|
| [dot](/commands/builtin/source) | Source external files. | `source` | special builtin |
|
||||||
|
| [false](/commands/builtin/false) | Fail at doing nothing. | | builtin |
|
||||||
|
| [continue / break](/commands/builtin/continueBreak) | continue with or break out of loops. | | special builtin |
|
||||||
|
| [let](/commands/builtin/let) | Arithmetic evaluation simple command. | | builtin |
|
||||||
|
| [return](/commands/builtin/return) | Return from a function with a specified exit status. | | special builtin |
|
||||||
|
| [[]](/commands/classictest) | The classic `test` simple command. | `test` | builtin |
|
||||||
|
|
||||||
[printf](/commands/builtin/printf) \"advanced `echo`.\" \- builtin
|
### Process and Job control
|
||||||
|
|
||||||
[read](/commands/builtin/read) Read input into variables or arrays, or split strings into fields using delimiters. \- builtin
|
!!! note
|
||||||
|
Commands related to jobs, signals, process groups, subshells.
|
||||||
|
|
||||||
Configuration and Debugging\ Alt Type
|
| Command | Description | Alt | Type |
|
||||||
\<wrap center round lo todo box 80%\>Commands that modify shell behavior, change special options, assist in debugging.\</wrap\>
|
| -------------------------------- | ------------------------------------------------------ | --- | --------------- |
|
||||||
|
| [exec](/commands/builtin/exec) | Replace the current shell process or set redirections. | | special builtin |
|
||||||
[caller](/commands/builtin/caller) Identify/print execution frames. \- builtin
|
| [exit](/commands/builtin/exit) | Exit the shell. | | special builtin |
|
||||||
|
| [trap](/commands/builtin/trap) | Set signal handlers or output the current handlers. | | special builtin |
|
||||||
[set](/commands/builtin/set) Set the positional parameters and/or set options that affect shell behaviour. \- special builtin
|
| [kill](/commands/builtin/kill) | Send a signal to specified process(es) | | builtin |
|
||||||
|
| [times](/commands/builtin/times) | Display process times. | | special builtin |
|
||||||
[shopt](/commands/builtin/shopt) set/get some bash-specific shell options. \- builtin
|
| [wait](/commands/builtin/wait) | Wait for background jobs and asynchronous lists. | | builtin |
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
\</WRAP\>
|
|
||||||
|
|
||||||
\<WRAP column 46%\>
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
Control flow and data processing\ Alt Type
|
|
||||||
\<wrap center round lo todo box 80%\>Commands that operate on data and/or affect control flow.\</wrap\>
|
|
||||||
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------- -------- -----------------
|
|
||||||
[colon](/commands/builtin/true) \"true\" null command. true special builtin
|
|
||||||
|
|
||||||
[dot](/commands/builtin/source) Source external files. source special builtin
|
|
||||||
|
|
||||||
[false](/commands/builtin/false) Fail at doing nothing. \- builtin
|
|
||||||
|
|
||||||
[continue / break](/commands/builtin/continueBreak) continue with or break out of loops. \- special builtin
|
|
||||||
|
|
||||||
[let](/commands/builtin/let) Arithmetic evaluation simple command. \- builtin
|
|
||||||
|
|
||||||
[return](/commands/builtin/return) Return from a function with a specified exit status. \- special builtin
|
|
||||||
|
|
||||||
[\[](/commands/classictest) The classic `test` simple command. test builtin
|
|
||||||
|
|
||||||
Process and Job control\ Alt Type
|
|
||||||
\<wrap center round lo todo box 80%\>Commands related to jobs, signals, process groups, subshells.\</wrap\>
|
|
||||||
|
|
||||||
[exec](/commands/builtin/exec) Replace the current shell process or set redirections. \- special builtin
|
|
||||||
|
|
||||||
[exit](/commands/builtin/exit) Exit the shell. \- special builtin
|
|
||||||
|
|
||||||
[kill](/commands/builtin/kill) Send a signal to specified process(es) \- builtin
|
|
||||||
|
|
||||||
[trap](/commands/builtin/trap) Set signal handlers or output the current handlers. \- special builtin
|
|
||||||
|
|
||||||
[times](/commands/builtin/times) Display process times. \- special builtin
|
|
||||||
|
|
||||||
[wait](/commands/builtin/wait) Wait for background jobs and asynchronous lists. \- builtin
|
|
||||||
|
|
||||||
Alt Type
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
\</WRAP\> \<WRAP clear\>\</WRAP\> \<WRAP hide\> previous alphabetical
|
|
||||||
version \<WRAP column 40%\>
|
|
||||||
|
|
||||||
A-G
|
|
||||||
-------------------------------------- ------------------------------------------------------------------------------------------------------
|
|
||||||
[caller](/commands/builtin/caller) identify/print execution frames (Bash builtin)
|
|
||||||
[coproc](/syntax/keywords/coproc) Co-processes (Bash keyword)
|
|
||||||
[declare](/commands/builtin/declare) display or set shell variables or functions along with attributes (Bash builtin, synonym: `typeset`)
|
|
||||||
[exec](/commands/builtin/exec) replace the shell, set redirections (Bash builtin)
|
|
||||||
I-N
|
|
||||||
[let](/commands/builtin/let) arithmetic evaluation - an old fashioned way (Bash builtin)
|
|
||||||
[mapfile](/commands/builtin/mapfile) Mapping lines of input to an array, also named `readarray` (Bash builtin)
|
|
||||||
|
|
||||||
\</WRAP\>
|
|
||||||
|
|
||||||
\<WRAP column 40%\>
|
|
||||||
|
|
||||||
O-T
|
|
||||||
---------------------------------------- ------------------------------------------------------------------
|
|
||||||
[printf](/commands/builtin/printf) \"advanced `echo`\" (Bash builtin)
|
|
||||||
[read](/commands/builtin/read) getting input from `stdin` (Bash builtin)
|
|
||||||
[readonly](/commands/builtin/readonly) mark variables or functions as read-only (Bash builtin)
|
|
||||||
[set](/commands/builtin/set) control positional parameters and shell behaviour (Bash builtin)
|
|
||||||
[shopt](/commands/builtin/shopt) set/get shell options (Bash builtin)
|
|
||||||
[test](/commands/classictest) the classic `test` command (Bash builtin)
|
|
||||||
U-Z
|
|
||||||
[unset](/commands/builtin/unset) unset variables and functions (Bash builtin)
|
|
||||||
|
|
||||||
\</WRAP\> \<WRAP clear\>\</WRAP\> \</WRAP\>
|
|
||||||
|
|
||||||
## Dictionary
|
## Dictionary
|
||||||
|
|
||||||
\<note tip\>A list of expressions, words, and their meanings is
|
A list of expressions, words, and their meanings is [here](/dict/index).
|
||||||
[here](/dict/index).\</note\>
|
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
### Official Bash links
|
### Official Bash links
|
||||||
|
|
||||||
- [Chet Ramey\'s Bash
|
- [Chet Ramey's Bash page](http://tiswww.case.edu/php/chet/bash/bashtop.html) and its [FAQ](http://tiswww.case.edu/php/chet/bash/FAQ).
|
||||||
page](http://tiswww.case.edu/php/chet/bash/bashtop.html) and its
|
- [GNU Bash software page](http://www.gnu.org/software/bash/)
|
||||||
[FAQ](http://tiswww.case.edu/php/chet/bash/FAQ).
|
- Official Bash mailing lists:
|
||||||
- [GNU Bash software page](http://www.gnu.org/software/bash/)
|
- **Bug reports**: <bug-bash@gnu.org> ([archives](http://mail.gnu.org/pipermail/bug-bash))
|
||||||
- Official Bash mailing lists:
|
- **General questions**: <help-bash@gnu.org> ([archives](http://mail.gnu.org/pipermail/help-bash))
|
||||||
- **Bug reports**: <bug-bash@gnu.org>
|
- Official Bash git repository:
|
||||||
([archives](http://mail.gnu.org/pipermail/bug-bash))
|
- **Browse**: [cgit](http://git.savannah.gnu.org/cgit/bash.git)
|
||||||
- **General questions**: <help-bash@gnu.org>
|
- **Clone**: `git clone git.sv.gnu.org/srv/git/bash.git`
|
||||||
([archives](http://mail.gnu.org/pipermail/help-bash))
|
|
||||||
- Official Bash git repository:
|
|
||||||
- **Browse**: [cgit](http://git.savannah.gnu.org/cgit/bash.git)
|
|
||||||
- **Clone**: //<git://> ssh://git.sv.gnu.org/srv/git/bash.git •
|
|
||||||
//<ssh://> ssh://git.sv.gnu.org/srv/git/bash.git • //<http://>
|
|
||||||
http://git.savannah.gnu.org/r/bash.git
|
|
||||||
|
|
||||||
### Recommended Shell resources
|
### Recommended Shell resources
|
||||||
|
|
||||||
- [Greg\'s wiki](http://mywiki.wooledge.org/) - Greg Wooledge\'s (aka
|
- [Greg's wiki](http://mywiki.wooledge.org/) - Greg Wooledge's (aka "greycat") wiki -- with **MASSIVE** information about Bash and UNIX(r) in general.
|
||||||
\"greycat\") wiki \-- with **MASSIVE** information about Bash and
|
- [BashFAQ](http://mywiki.wooledge.org/BashFAQ) • [BashGuide](http://mywiki.wooledge.org/BashGuide) • [BashPitfalls](http://mywiki.wooledge.org/BashPitfalls) • [BashSheet](http://mywiki.wooledge.org/BashSheet)
|
||||||
UNIX(r) in general.
|
- [Sven Mascheck's pages](http://www.in-ulm.de/~mascheck/) - A goldmine of information. A must-read.
|
||||||
- [BashFAQ](http://mywiki.wooledge.org/BashFAQ) •
|
- [#ksh channel page](https://www.mirbsd.org/ksh-chan.htm) - #ksh Freenode channel page maintains a solid collection of recommended links.
|
||||||
[BashGuide](http://mywiki.wooledge.org/BashGuide) •
|
- [The Grymoire Unix pages](http://www.grymoire.com/Unix/) - Good scripting information, especially read the [quoting](http://www.grymoire.com/Unix/Quote.html) guide.
|
||||||
[BashPitfalls](http://mywiki.wooledge.org/BashPitfalls) •
|
- [Heiner's "Shell Dorado"](http://www.shelldorado.com) - Tips, tricks, links - for every situation.
|
||||||
[BashSheet](http://mywiki.wooledge.org/BashSheet)
|
- [The Single Unix Specification (version 4, aka POSIX-2008)](http://pubs.opengroup.org/onlinepubs/9699919799/)
|
||||||
- [Sven Mascheck\'s pages](http://www.in-ulm.de/~mascheck/) - A
|
- [The Austin Group](http://www.opengroup.org/austin/) - [List archives](http://dir.gmane.org/gmane.comp.standards.posix.austin.general), [Bug tracker](http://austingroupbugs.net/main_page.php)
|
||||||
goldmine of information. A must-read.
|
- [comp.unix.shell FAQ](http://cfajohnson.com/shell/cus-faq.html)
|
||||||
- [#ksh channel page](https://www.mirbsd.org/ksh-chan.htm) - #ksh
|
- [Advanced Bash-Scripting Guide](https://tldp.org/LDP/abs/html/index.html) - last update: 10 Mar 2014, but still very useful guide.
|
||||||
Freenode channel page maintains a solid collection of recommended
|
|
||||||
links.
|
|
||||||
- [The Grymoire Unix pages](http://www.grymoire.com/Unix/) - Good
|
|
||||||
scripting information, especially read the
|
|
||||||
[quoting](http://www.grymoire.com/Unix/Quote.html) guide.
|
|
||||||
- [Heiner\'s \"Shell Dorado\"](http://www.shelldorado.com) - Tips,
|
|
||||||
tricks, links - for every situation.
|
|
||||||
- [The Single Unix Specification (version 4, aka
|
|
||||||
POSIX-2008)](http://pubs.opengroup.org/onlinepubs/9699919799/)
|
|
||||||
- [The Austin Group](http://www.opengroup.org/austin/) - [List
|
|
||||||
archives](http://dir.gmane.org/gmane.comp.standards.posix.austin.general),
|
|
||||||
[Bug tracker](http://austingroupbugs.net/main_page.php)
|
|
||||||
- [comp.unix.shell FAQ](http://cfajohnson.com/shell/cus-faq.html)
|
|
||||||
- [Advanced Bash-Scripting
|
|
||||||
Guide](https://tldp.org/LDP/abs/html/index.html) - last update: 10
|
|
||||||
Mar 2014, but still very useful guide.
|
|
||||||
|
|
||||||
#### Documentation / Reference
|
#### Documentation / Reference
|
||||||
|
|
||||||
- **Bash**: [man page](http://tiswww.case.edu/php/chet/bash/bash.html)
|
- **Bash**: [man page](http://tiswww.case.edu/php/chet/bash/bash.html), [info page](http://tiswww.case.edu/php/chet/bash/bashref.html)
|
||||||
[info page](http://tiswww.case.edu/php/chet/bash/bashref.html)
|
- **AT&T ksh**: [ksh88](http://www2.research.att.com/sw/download/man/man1/ksh88.html), [ksh93](http://www2.research.att.com/sw/download/man/man1/ksh.html)
|
||||||
- **AT&T ksh**:
|
- [mksh](https://www.mirbsd.org/htman/i386/man1/mksh.htm) (pdksh successor)
|
||||||
[ksh88](http://www2.research.att.com/sw/download/man/man1/ksh88.html)
|
- [zsh](http://zsh.sourceforge.net/Doc/)
|
||||||
[ksh93](http://www2.research.att.com/sw/download/man/man1/ksh.html)
|
- [dash](http://man7.org/linux/man-pages/man1/dash.1.html)
|
||||||
- [mksh](https://www.mirbsd.org/htman/i386/man1/mksh.htm) (pdksh
|
- [Heirloom Bourne shell](http://heirloom.sourceforge.net/man/sh.1.html)
|
||||||
successor)
|
- [Thompson shell](http://v6shell.org/man/osh.1.html)
|
||||||
- [zsh](http://zsh.sourceforge.net/Doc/)
|
|
||||||
- [dash](http://man7.org/linux/man-pages/man1/dash.1.html)
|
|
||||||
- [Heirloom Bourne
|
|
||||||
shell](http://heirloom.sourceforge.net/man/sh.1.html)
|
|
||||||
- [Thompson shell](http://v6shell.org/man/osh.1.html)
|
|
||||||
|
|
||||||
### Assorted interesting links
|
### Assorted interesting links
|
||||||
|
|
||||||
- [History and development of the traditional Bourne shell
|
- [History and development of the traditional Bourne shell family](http://www.in-ulm.de/~mascheck/bourne/) - very interesting and nice to read!
|
||||||
family](http://www.in-ulm.de/~mascheck/bourne/) - very interesting
|
- [Interview with Chet Ramey](http://www.computerworld.com.au/article/222764/-z_programming_languages_bash_bourne-again_shell)
|
||||||
and nice to read!
|
- [Interview with Steve Bourne](http://www.computerworld.com.au/article/279011/a-z_programming_languages_sh) • [Stephen Bourne - BSDCan 2015 keynote](https://www.youtube.com/watch?v=2kEJoWfobpA)
|
||||||
- [Interview with Chet
|
- [Interview with David Korn](http://news.slashdot.org/story/01/02/06/2030205/david-korn-tells-all)
|
||||||
Ramey](http://www.computerworld.com.au/article/222764/-z_programming_languages_bash_bourne-again_shell)
|
- [Kernighan on the Unix pipeline (computerphile video)](https://www.youtube.com/watch?v=bKzonnwoR2I)
|
||||||
- [Interview with Steve
|
- Linux in general, with some shell related stuff: [nixCraft: Linux Tips, Hacks, Tutorials and Ideas](http://www.cyberciti.biz/)
|
||||||
Bourne](http://www.computerworld.com.au/article/279011/a-z_programming_languages_sh)
|
- Linux tutorials, guides and how-tos: [RoseHosting Blog](https://www.rosehosting.com/blog/), [bash script for installing WordPress](https://www.rosehosting.com/blog/script-install-wordpress-on-a-debianubuntu-vps/) and some [basic shell commands](https://www.rosehosting.com/blog/basic-shell-commands-after-putty-ssh-logon/)
|
||||||
• [Stephen Bourne - BSDCan 2015
|
- [Bashphorism list from the Bash IRC channel on Freenode](/misc/bashphorisms)
|
||||||
keynote](https://www.youtube.com/watch?v=2kEJoWfobpA)
|
- [Some more or less funny commandline stuff](/misc/shell_humor)
|
||||||
- [Interview with David
|
- [How to Enable SSH on Ubuntu Tutorial](https://thishosting.rocks/how-to-enable-ssh-on-ubuntu/)
|
||||||
Korn](http://news.slashdot.org/story/01/02/06/2030205/david-korn-tells-all)
|
- [How To Make an Awesome Custom Shell with ZSH](https://linuxstans.com/how-to-make-an-awesome-custom-shell-with-zsh/)
|
||||||
- [Kernighan on the Unix pipeline (computerphile
|
|
||||||
video)](https://www.youtube.com/watch?v=bKzonnwoR2I)
|
|
||||||
- Linux in general, with some shell related stuff: [nixCraft: Linux
|
|
||||||
Tips, Hacks, Tutorials and Ideas](http://www.cyberciti.biz/)
|
|
||||||
- Linux tutorials, guides and how-tos: [RoseHosting
|
|
||||||
Blog](https://www.rosehosting.com/blog/), [bash script for
|
|
||||||
installing
|
|
||||||
WordPress](https://www.rosehosting.com/blog/script-install-wordpress-on-a-debianubuntu-vps/)
|
|
||||||
and some [basic shell
|
|
||||||
commands](https://www.rosehosting.com/blog/basic-shell-commands-after-putty-ssh-logon/)
|
|
||||||
- [Bashphorism list from the Bash IRC channel on
|
|
||||||
Freenode](/misc/bashphorisms)
|
|
||||||
- [Some more or less funny commandline stuff](/misc/shell_humor)
|
|
||||||
- [How to Enable SSH on Ubuntu
|
|
||||||
Tutorial](https://thishosting.rocks/how-to-enable-ssh-on-ubuntu/)
|
|
||||||
- [How To Make an Awesome Custom Shell with
|
|
||||||
ZSH](https://linuxstans.com/how-to-make-an-awesome-custom-shell-with-zsh/)
|
|
||||||
|
|
||||||
### Bash Libraries (needs review)
|
### Bash Libraries (needs review)
|
||||||
|
|
||||||
- [An oo-style bash library for bash
|
- [An oo-style bash library for bash 4](http://sourceforge.net/projects/oobash/) - provides tools for rapid script development and huge libraries.
|
||||||
4](http://sourceforge.net/projects/oobash/) - provides tools for
|
- [General purpose shell framework for bash 4](https://github.com/hornos/shf3) - in development.
|
||||||
rapid script development and huge libraries.
|
- [General purpose bash library for bash 4](https://github.com/chilicuil/learn/blob/master/sh/lib) - active development
|
||||||
- [General purpose shell framework for bash
|
|
||||||
4](https://github.com/hornos/shf3) - in development.
|
|
||||||
- [General purpose bash library for bash
|
|
||||||
4](https://github.com/chilicuil/learn/blob/master/sh/lib) - active
|
|
||||||
development
|
|
||||||
|
|
||||||
\<div hide\>
|
|
||||||
|
|
||||||
## Most wanted
|
|
||||||
|
|
||||||
Statistics for Month: **April 2012**
|
|
||||||
-------------------------------------- ------- ------------------------------------------------------------
|
|
||||||
Rank Views Article
|
|
||||||
1 6833 [getopts_tutorial](/howto/getopts_tutorial) (March: 11663)
|
|
||||||
2 4025 [printf](/commands/builtin/printf) (March: 7079)
|
|
||||||
3 2861 [quoting](/syntax/quoting) (March: 5730)
|
|
||||||
4 2854 [classictest](/commands/classictest) (March: 6145)
|
|
||||||
5 2222 [pe](/syntax/pe) (March: 4540)
|
|
||||||
6 1760 [posparams](/scripting/posparams) (March: 3591)
|
|
||||||
7 1249 [bash4](bash4) (March: \--)
|
|
||||||
8 1212 [edit-ed](/howto/edit-ed) (March: 2727)
|
|
||||||
9 1205 [read](/commands/builtin/read) (March: \--)
|
|
||||||
10 1182 [mutex](/howto/mutex) (March: \--)
|
|
||||||
|
|
||||||
- \"Total visits\": 35144
|
|
||||||
- The overall \"start\" page is not counted
|
|
||||||
|
|
||||||
\</div\>
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
|
||||||
\<WRAP column 40%\> Visit us in <ircs://irc.libera.chat:6697>, channel
|
Visit us in [ircs://irc.libera.chat:6697](ircs://irc.libera.chat:6697), channel `#bash` ;-)
|
||||||
`#bash` ;-)
|
|
||||||
|
|
||||||
If you have critiques or suggestions, please feel free to send a mail
|
If you have critiques or suggestions, please feel free to send a mail using the contact form on the right.
|
||||||
using the contact form on the right. Note that there is a simple
|
Note that there is a simple discussion option below every article.
|
||||||
discussion option below every article.
|
|
||||||
|
|
||||||
Please also see the [imprint](/user/thebonsai/imprint) if you have
|
Please also see the [imprint](/user/thebonsai/imprint) if you have problems with the site and its contents (legality, ...)!
|
||||||
problems with the site and its contents (legality, \...)!
|
|
||||||
|
|
||||||
It also would be nice to drop a line when
|
It also would be nice to drop a line when
|
||||||
|
|
||||||
- it helped you
|
- it helped you
|
||||||
- it didn\'t help you (something missing / unclear)
|
- it didn't help you (something missing / unclear)
|
||||||
- you like it
|
- you like it
|
||||||
- you don\'t like it
|
- you don't like it
|
||||||
- you found mistakes / bugs
|
- you found mistakes / bugs
|
||||||
|
|
||||||
Simply: Reader\'s feedback \</WRAP\>
|
Simply: Reader's feedback.
|
||||||
|
|
||||||
\<WRAP column 40%\> ![](contact>subj=Wiki reader feedback) \</WRAP\>
|
|
||||||
\<WRAP clear\>\</WRAP\>
|
|
||||||
|
14
mkdocs.yml
14
mkdocs.yml
@ -1,3 +1,15 @@
|
|||||||
site_name: Wiki Bash Hackers
|
site_name: The Bash Hackers Wiki
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
|
features:
|
||||||
|
- navigation.tabs
|
||||||
|
|
||||||
|
plugins:
|
||||||
|
- tags
|
||||||
|
|
||||||
|
markdown_extensions:
|
||||||
|
- admonition
|
||||||
|
|
||||||
|
nav:
|
||||||
|
- Start: index.md
|
Loading…
Reference in New Issue
Block a user