Get the Last Argument of the Last Run Command in Your Shell



  • $_ will give you the last argument of the last run command:
mkdir testDir
echo "$_"
#> testDir
  • ${_} runs the last run command

Backlinks