Using !$ To Use Last Parameter
Tue, 07/22/2008 - 08:15 | by philipnorton42
Much like using Alt+. to print out last parameter you can also use !$ to use the last parameter from the previous command. Here is a simple example.
# cd .. # cd !$
In this example we are moving up a directory and then doing the same action again, the !$ is a short cut to get hold of the ... This is more useful when doing things with longer parameters like directory or file names. For example here we are creating a directory and then moving into that same directory.
# mkdir /www/htdocs/directory/ # cd !$
Comments
Post new comment