---

Using an exclamation point (!) to reference events

The C Shell history mechanism uses an exclamation point to reference events. This technique, which is available under bash and tcsh, is frequently more cumbersome to use than fc but nevertheless has some useful features. For example, the !! command reexecutes the previous event, and the shell replaces the !$ token with the last word from the previous command line.

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis