How does ${!#} work in bash to get the last command-line argument? – unix.stackexchange.com

From the Advanced Bash-Scripting Guide, to get the last command-line argument: Or: lastarg=${!#} This is an indirect reference to the $# variable. Note that lastarg=${!$#} doesn't work.

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

Artikel Terkait

0 Comment to "How does ${!#} work in bash to get the last command-line argument? – unix.stackexchange.com"