in

The Bash Hackers Wiki, Hacker News

          

            

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.

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.

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. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/>.

What would YOU like to see here? (outdated and locked, please use the discussions)

Stranger! Feel free to register and comment or edit the contents. There is a Bash Hackers Wiki needs love page that lists some things to do. The registration is only there to prevent SPAM.

Scripting and general information

Bash syntax and operations

Expansions and substitutions

Builtin Commands

This is a selection of builtin commands and command-like keywords, loosely arranged by their common uses. These are provided directly by the shell, rather than invoked as standalone external commands.

)

Declaration commands Commands that set and query attributes / types, and manipulate simple datastructures. (Alt)

Type

declare Display or set shell variables or functions along with attributes. (typesets)

builtin (export Display or set shell variables, also giving them the export attribute. (typeset -x) (

) (special builtin

(eval (Evaluate arguments as shell code. -

special builtin

(local ) Declare variables as having function local scope. - builtin readonly Mark variables or functions as read-only. (typeset -r) special builtin (unset Unset variables and functions. - special builtin (shift ) (Shift positional parameters) - special builtin I / O (Commands for reading / parsing input, or producing / formatting output of standard streams.) (Alt

) (Type)

(coproc Co-processes: Run a command in the background with pipes for reading / writing its standard streams.

- keyword

(echo ) (Create output from arguments.) - builtin (mapfile ) Read lines of input into an array. (readarray) (builtin) printf (advanced) echo . ”

- (builtin) (read ) Read input into variables or arrays, or split strings into fields using delimiters. (builtin) Configuration and Debugging Commands that modify shell behavior, change special options, assist in debugging. Alt Type (caller ) (Identify / print execution frames.) builtin set (Set the positional parameters and / or set options that affect shell behavior.)

- (special builtin)

(shopt ) set / get some bash-specific shell options. - (builtin)

(Control flow and data processing

Commands that operate on data and / or affect control flow. (Alt

Type colon

"true" null command. (true) special builtin (dot) Source external files. (source) special builtin (false) Fail at doing nothing. - builtin (continue / break continue with or break out of loops. - special builtin let Arithmetic evaluation simple command. - builtin (return) Return from a function with a specified exit status. - special builtin ( (The classic) (test) simple command. (test) builtin Process and Job control Commands related to jobs, signals, process groups, subshells.

(Alt ) (Type

(exec) Replace the current shell process or set redirections. - special builtin (exit) Exit the shell. - special builtin kill Send a signal to specified process (es) - (builtin) trap Set signal handlers or output the current handlers. - special builtin (times Display process times. - special builtin wait Wait for background jobs and asynchronous lists. - builtin Alt ()

 previous alphabetical version

)

AG) caller (identify / print execution frames (Bash builtin)

IN

mark variables or functions as read-only (Bash builtin)

(UZ)

(coproc Co-processes (Bash keyword) declare display or set shell variables or functions along with attributes (Bash builtin, synonym: typeset

(exec) replace the shell, set redirections (Bash builtin)
let arithmetic evaluation - an old fashioned way (Bash builtin) (mapfile ) Mapping lines of input to an array, also named readarray builtin)

OT printf

(advanced (echo) "(Bash builtin)

(read ) getting input from stdin (Bash builtin)

readonly
set control positional parameters and shell behavior (Bash builtin) (shopt ) set / get shell options (Bash builtin) (test) (the classic) (test) command (Bash builtin)

(unset unset variables and functions (Bash builtin)

A list of expressions, words, and their meanings is here .

Official Bash links (Recommended Shell resources) (Documentation / Reference) Assorted interesting links

Bash Libraries (needs review)

(# bash)

If you have critiques or suggestions, please feel free to send a mail using the contact form on the right. Note that there is a simple discussion option below every article.

Please also see the imprint if you have problems with the site and its contents (legality, ...)!

It also would be nice to drop a line when

Simply: Reader's feedback

                    (Read More)

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings

Elon Musk is Making Hay While the Sun Shines on Tesla & SpaceX, Crypto Coins News

Elon Musk is Making Hay While the Sun Shines on Tesla & SpaceX, Crypto Coins News

Amazon Let a Fraudster Keep My Sony a7R IV and Refunded Him $ 2,900, Hacker News

Amazon Let a Fraudster Keep My Sony a7R IV and Refunded Him $ 2,900, Hacker News