If I Had Known This Sooner: $_
There are always times that I learned something useful and/or cool which I wish I had known sooner. So, I decided to write these little things down. Maybe these kind of things have the protential to be a series.
For anyone who constantly works on *nix systems, it’s really common often to interact with terminal.
One of the common tasks people do in terminal is creating a folder:
That’s normal, right? But what if I want to go to that folder?
It’s all good, man. But what if the path is long or has multiple levels?
Without the help of mouse support or smashing
tab key, it’s really painful to change directory fast.
And of course, this is where
$_ comes to rescue.
$_ is a bash parameter which tells you what the last argument is. So:
But how do we know if it really is the last argument?