[Chapter 11] 11.16 Instead of Changing History Characters
Author: Jerry Peek, Tim O'Reilly & Mike Loukides
Date: 1998-08-04T21:36:22Z

#

| Chapter 11 The Lessons of History |

## 11.16 Instead of Changing History Characters

If you need to use `!` (or your current history character) for a command (most often, a uucp or mail (1.33) command), you can type a backslash (`\`) before each history character. You can also drop into the Bourne shell quickly (assuming that you aren't on a system that has replaced the real Bourne shell with bash). Either of these are probably easier than changing histchars. For example:

>     % mail ora\!ishtar\!sally < file1Quote the !s
>     % sh   Start the Bourne shell
>     $ mail ora!ishtar!sally < file1! not special here
>     $ exit   Quit the Bourne shell
>     %   And back to the C shell

The original Bourne shell doesn't have any kind of history substitution, so `!` doesn't mean anything special; it's just a regular character.

By the way, if you have a window system, you can probably copy and paste the command line instead of using shell history.

- ML

11.15 Changing C Shell History Characters with histchars |  | 12. Job Control