TIL: Use $_ to reuse the last argument in Bash/linux terminal commands!

Posted by NikuKuda@reddit | linux | View on Reddit | 75 comments

Just found out you can use $_ in Bash to reference the last argument of your previous command.
For example, instead of typing: mkdir dir1 && cd dir1

You can do: mkdir dir1 && cd $_

Writing directory/folder name two timers in mkdir sucks!