[TriLUG] history
Dan
trilug at daijin.nulluser.com
Mon Feb 23 12:52:04 EST 2004
--On Monday, February 23, 2004 12:16:02 PM -0500 Stephen Hoffman
<srhoffman at hofftech.net> wrote:
> Got a question about functionality that may or may not exist, but I
> certainly don't want to start writing programs that already exist...
>
> I want to be able to use the commands out of "history".
If you're using bash (if not then why not <grin>)... the history 'command'
is a builtin that is documented in the bash man page. One of the cooler
things I had set an alias up for was to run the previous command with
substring substitution. If I made a directory with
mkdir dir1
I had an alias 'r' that would be
r 1=2
and the command run would be
mkdir dir2
It was ever so handy.
--
Dan
More information about the TriLUG
mailing list