--- On Thu, 21/10/10, Tha.Suresh <[email protected]> wrote:

> See The MAN page for the last
> command
> 
> $ man !!
> 
> $ man !!:0
> 
> This works in bash. The "!!:0" limits the argument to man
> to be only
> the first word of the last command. "!!:1" would be the
> second, etc.
> 
> 
> EX:
> 
> a...@arul-desktop:~$ ls | wc
>      17      17 
>    153
> a...@arul-desktop:~$ man !!:0
> man ls
> 
> a...@arul-desktop:~$ ls | wc
> 17      17     153
> a...@arul-desktop:~$ man !!:1
> man |
> 
> a...@arul-desktop:~$ ls | wc
> 17      17     153
> a...@arul-desktop:~$ man !!:2
> man wc

This tip is not limited to man. Actually !! stands for last command. So you can 
use things like
!!      - to just repeat last command 
info !! - to get info pages of last command
echo !! - simply echo last command name
time !! - rerun the command and get time usage

Raman.P
blog:http://ramanchennai.wordpress.com/




_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to