[kanchilug] [Tip] See The MAN page for the last command

  • From: "Tha.Suresh" <jemenisuresh@xxxxxxxxx>
  • To: ILUG-C <ilugc@xxxxxxxxxxxxx>, KanchiLug <kanchilug@xxxxxxxxxxxxx>, iitdlug@xxxxxxxxxxxxxxxx
  • Date: Thu, 21 Oct 2010 07:14:35 +0530

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:

arul@arul-desktop:~$ ls | wc
     17      17     153
arul@arul-desktop:~$ man !!:0
man ls

arul@arul-desktop:~$ ls | wc
17      17     153
arul@arul-desktop:~$ man !!:1
man |

arul@arul-desktop:~$ ls | wc
17      17     153
arul@arul-desktop:~$ man !!:2
man wc






-- 
Regards,
Tha.Suresh
My experiences with Linux are here,
http://thasulinux.wordpress.com
 

Other related posts:

  • » [kanchilug] [Tip] See The MAN page for the last command - Tha.Suresh