Linux 查看历史命令并执行的方法

查看历史命令,并执行指定命令

owen@owen:~/owen/software/nginx-1.10.1$ history | grep 'configure'
1083 ./configure 
1109 ./configure --prefix=/usr/nginx
1110 ./configure --prefix=/usr/nginx
2058 ./configure --prefix=/usr/local/nginx --with-openssl=/home/owen/owen/software/openssl-1.0.2m --with-http_ssl_module --add-dynamic-module=/home/owen/owen/project/src/ngx_my_test_study
2064 history | grep configure 

owen@owen:~/owen/software/nginx-1.10.1$ !2058
./configure --prefix=/usr/local/nginx --with-openssl=/home/owen/owen/software/openssl-1.0.2m --with-http_ssl_module --add-dynamic-module=/home/owen/owen/project/src/ngx_my_test_study