[NTLUG:Discuss] HOW? bash shell shortcut using history | grep

Lance Simmons lance at lsimmons.net
Wed Jun 6 23:12:37 CDT 2001


On Wed, Jun 06, 2001 at 11:00:57PM -0500, Richard Geoffrion wrote:
> 
>  history | grep {command} ... then getting the number..then
>  typing in the number and hitting some key to make the command
>  pop onto the command line?
> 
> What did he do?  What keystroke did he use?

! immediately followed by the number.

e.g.: 

  !435<enter>

executes line 435 in history.

!! repeats the most recent command line (like the up arrow).

Lance Simmons



More information about the Discuss mailing list