Tuesday, July 8, 2008

Argument of the previous command

To use the last argument of the previous command line as an argument, use $_.

For example:
$ ls -l /home/sanju/somefile
$ vi $_

It will open /usr/home/somefile using vi editor.

No comments: