Subject: Re: Show or Repeat Last Commands #3
To: Terry Norris <tknorris@ameritech.net>
From: None <oinkfreebiker@att.net>
List: netbsd-help
Date: 08/17/2001 02:53:47
Okay, a bit complex, but if you...
# history
...you get a numbered list. Which if you do...
# !8
...it repeats item eight from the list. And if
you had previously done...
# ls -l
...and it was item seven on the list, then if you
did this...
# !7:s/-l/-a/
...that works as a regular expression substitution
(just like in Perl) and it will be as if you did
this anew...
# ls -a
...instead of "ls -l" which was item seven from the
history list.
It's all in there under...
# man history
...I did not find a way to make it work like "doskey"
in Windoze, where it prints the old up on the screen
for manual editing. Maybe it can do that, but I didn't
find it.
If you do...let me know?
Thanks,
Gan Starling
Kalamazoo MI USA
--
Windows, n. (archaic) -- That
32-bit patch to its 16-bit GUI
re-issue of its 8-bit OS for a
4-bit CPU from a 2-bit company
fearing even one single bit
of competition.