UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 11.15 Changing C Shell History Characters with histchars Chapter 11
The Lessons of History
Next: 12. Job Control
 

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


Previous: 11.15 Changing C Shell History Characters with histchars UNIX Power ToolsNext: 12. Job Control
11.15 Changing C Shell History Characters with histchars Book Index12. Job Control

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System