The wonder of !$ and !*

!$

Ever wanted to re-use the last argument you gave to a command?

<some command> !$

This tells the command to use the last argument given in the previous command.

<some command> !*

This will tell the current command to use all of the previous command's parameters instead of just the last one.

touch file 200 202
chmod 777 !$
chmod 777 202


touch file 100 10
chmod 777 !*
chmod 777 file 100 102

Browse Space

- Pages
- News
- Labels
- Attachments
- Bookmarks
- Mail
- Advanced

Explore Confluence

- Popular Labels
- Notation Guide

Your Account

Log In

 

Other Features

Add Content

- Add Comment