Pages

Monday, December 10, 2012

linux: execute particular history command

suppose you want to execute a particular command out of N history commands:

$history

...
...
...

1992  pwd
 1993  clear
 1994  cd foo
 1995  ls
 1996  ./a.out
 1997  ls -als <<== if you want to execute this command, run "!1997 " on terminal
 1998  ssh bar
 1999  ping bar
  2000  history
$!1997


1 comment:

  1. [url=http://ivlkrwnnz.com]CvFeIpoirduRSS[/url] , wmMOYNQj - http://hhmgziigpu.com

    ReplyDelete