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 < file1
Quote 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.