On Tue, Sep 10, 2013 at 11:35 AM, Balasubramaniam Natarajan
<[email protected]> wrote:
>
> Hi
>
> How do I echo the current command which I typed in bash ?  I know that our
> current command goes and sit's in the value of "$0"  However when I try
> putting this inside .bashrc it does not give me correct results.
>


If you're trying to update the title of the xterm, you can use a DEBUG trap:

trap 'echo "$BASH_COMMAND"' DEBUG

Not the same as you expect.
But it gives the command name executed.

Thanks to :
http://stackoverflow.com/questions/5077836/bash-how-to-find-current-shell-command



 --

Regards,
T.Shrinivasan

My Life with GNU/Linux : http://goinggnu.wordpress.com
Free E-Magazine on Free Open Source Software in Tamil : http://kaniyam.com

Get CollabNet Subversion Edge :     http://www.collab.net/svnedge
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines

Reply via email to