In Bash, there appear to be several variables which hold special, consistently-meaning values. For instance,
./myprogram &; echo $!
will return the PID of the process which backgrounded myprogram
. I know of others, such as $?
which I think is the current TTY. Are there others?
$'\n'
is a literal newline character that result from replacing the digraph\n
with ASCII 10. – Amorete${1}
,${*}
, etc, the braces are just for disambiguation, and often redundant. In isolation,${x}
is exactly equivalent to$x
. – Outsail$IFS
see What is the exact meaning ofIFS=$'\n'
– Glass$?
is not theTTY
- it is the return value of the last executed command.tty
is the simple command for it. – Ditchwater