Notes
Bash
Paremters and variables
$1
,$2
,$3
, … are the positional parameters.$@
is an array-like construct of all positional parameters, {$1, $2, $3 …}.$*
is the IFS expansion of all positional parameters, $1 $2 $3 ….$#
is the number of positional parameters.$-
current options set for the shell.$$
pid of the current shell (not subshell).$_
most recent parameter (or the abs path of the command to start the current shell immediately after startup).$IFS
is the (input) field separator.$?
is the most recent foreground pipeline exit status.$!
is the PID of the most recent background command.$0
is the name of the shell or shell script.
File descriptors
0
- stdin1
- stdout2
- stderr3
,4
… - custom>
redirects output to a file>&
redirects output to another file descriptor
Interrupt signals
- SIGHUP
- SIGINT
- SIGQUIT
- SIGILL
- SIGTRAP
- SIGABRT
- SIGBUS
- SIGFPE
- SIGKILL
- SIGUSR1
- SIGSEGV
- SIGUSR2
- SIGPIPE
- SIGALRM
- SIGTERM
- SIGSTKFLT
- SIGCHLD
- SIGCONT
- SIGSTOP
- SIGTSTP
- SIGTTIN
- SIGTTOU
- SIGURG
- SIGXCPU
- SIGXFSZ
- SIGVTALRM
- SIGPROF
- SIGWINCH
- SIGIO
- SIGPWR
- SIGSYS
- SIGWAITING
- SIGLWP
- SIGRTMIN
- SIGRTMIN+1
- SIGRTMIN+2
- SIGRTMIN+3
- SIGRTMIN+4
- SIGRTMIN+5
- SIGRTMIN+6
- SIGRTMIN+7
- SIGRTMIN+8
- SIGRTMIN+9
- SIGRTMIN+10
- SIGRTMIN+11
- SIGRTMIN+12
- SIGRTMIN+13
- SIGRTMIN+14
- SIGRTMIN+15
- SIGRTMAX-14
- SIGRTMAX-13
- SIGRTMAX-12
- SIGRTMAX-11
- SIGRTMAX-10
- SIGRTMAX-9
- SIGRTMAX-8
- SIGRTMAX-7
- SIGRTMAX-6
- SIGRTMAX-5
- SIGRTMAX-4
- SIGRTMAX-3
- SIGRTMAX-2
- SIGRTMAX-1
- SIGRTMAX
Manual
https://www.gnu.org/software/bash/manual/html_node/index.html