Bash Internal variables $_

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9


Outputs the last field from the last command executed, useful to get something to pass onwards to another command:

 ~> $ ls *.sh;echo $_

It gives the script path if used before any other commands:

echo "$_"


~> $ ./ # running

Note: This is not a foolproof way to get the script path

Got any Bash Question?