Jay Taylor's notes

back to listing index

bash - What are the special dollar sign shell variables? - Stack Overflow

[web search]
Original source (stackoverflow.com)
Tags: programming bash shell shell-scripting dollar stackoverflow.com
Clipped on: 2013-10-02

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?

Image (Asset 1/4) alt=