from version 3.2.57 there exists version 5.1 as of 12/2020
| | |
nice
.. : break continue eval exec exit export readonly return set shift times trap unset history suspend
Basic Installation | Compilers and Options | Compiling For Multiple Architectures | Installation Names |
Specifying the System Type | Sharing Defaults | Operation Controls | Optional Features |
DGG made this nice stuff from, what is now, and old version of the docs.
The truth is out there gnu.org/software/bash/manual/bashref.html
> bash --help # as of 7/28/16 GNU bash, version 4.1.2(1)-release-(x86_64-redhat-linux-gnu) Usage: bash [GNU long option] [option] ... bash [GNU long option] [option] script-file ... GNU long options: --debug --debugger --dump-po-strings --dump-strings --help --init-file --login --noediting --noprofile --norc --rcfile --posix --restricted --protected --rpm-requires --verbose --version Shell options: -irsD or -c command or -O shopt_option (invocation only) -abefhkmnptuvxBCHP or -o option Type `bash -c "help set"' for more information about shell options. Type `bash -c help' for more information about shell builtin commands.Set the variable corresponding to option-name:
|
- Assign any remaining arguments to the positional parameters.
The -x
and -v
are turned off.
Using + causes flags to be turned off.
The flags can be used at invocation of the shell,
current set of flags may be found in $-
. echo $- himBH
(hashall, jobcontrol, Braceexpand, HistExpand )
The remaining n ARGs are positional parameters and are assigned, in order, to
$1, $2, … $n
.
If no ARGs are given, all variables are output.
set BASH_COMPLETION_COMPAT_DIR=/etc/bash_completion.d empty ?? /etc/bashrc_Apple_Terminal :
Versions
Mac OS has an older version of bash 3.2.57.(1). It will not include newer versions,
as well as several other commands (including:sed
)
becuse they have a GPL V3 license that explicitly restricts commercial Unix vendors from including them.
Where there is an open source command you are allowed to install it (in an unprotected directory, safe from Mac OS upgrades). Package managers that can add them include: Homebrew, MacPorts, Fink.Various distrbutions:
cygwin 2.05b.0(8)-release
@Real-World-Systems.com : BASH_VERSION=GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
> ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Nov 20 2014 /bin/sh -> bash
Changes of note:
⌘ :> /bin/sh -c 'echo -e "Hello\n\tWorld"' -e Hello World > /bin/bash -c 'echo -e "Hello\n\tWorld"' Hello WorldSeverly hacked by Dennis G German beginning 12/18/01 and continuing today
Sub versions up to -53 exist( these do not change functionally but correct bugs
-53