Friday, October 12, 2007
8:42 AM

You can always have the Last Word In ..

!$ is a handy shorthand for the last word in the previous command.

At first, it may not seem that useful.

But wait, ...

cd somedir
cp some_file_a /some/long/dir/path/some_file_b

Now you want to edit some_file_b

Just type
vi !$

That translates to vi /some/long/dir/path/some_file_b

It saves quite a bit of typing. Not bad.

0 comments:

Post a Comment