Today I Learned

A Hashrocket project

Ready to join Hashrocket? Find Openings here and apply today.

Access last argument in a shell

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 $_