15 Aug 2022   command-line


You can access the last command’s last argument with $_

Example:

> echo '🍟 I Eat Food'
🍟 I Eat Food

> echo $_
🍟 I Eat Food

Example Two:

> dropdb my_database
> createdb $_
πŸ„