Using $_
, you can access the last argument of the last command executed.
Example:
$ echo "Have a nice day!"
Have a nice day!
$ echo $_
Have a nice day!
Writings | GitHub | LinkedIn Using Example:Access the last argument of the last command in a shell
$_
, you can access the last argument of the last command executed.$ echo "Have a nice day!"
Have a nice day!
$ echo $_
Have a nice day!