Is threre any Shell variable that keep the last executed command
am 13.10.2007 00:46:42 von parag_paul
I want to do something like make an alias that will send me a mail
about the last command executed.
Like
alias tom 'set gh `!-1:p`;touch a; mail -s "done with $gh" paragp
Where gh should have the last command executed.
So that I get that message on my mobile device that the command that I
had typed is done
Re: Is threre any Shell variable that keep the last executed command
am 13.10.2007 03:21:12 von Janis Papanagnou
parag_paul@hotmail.com wrote:
> I want to do something like make an alias that will send me a mail
> about the last command executed.
>
> Like
> alias tom 'set gh `!-1:p`;touch a; mail -s "done with $gh" paragp
>
> Where gh should have the last command executed.
> So that I get that message on my mobile device that the command that I
> had typed is done
>
You seem to use csh where I cannot help you much, but inspect the csh
builtin 'history' command to get the required information. If you are
interested in say a ksh solution play around with the 'fc' command and
options -lnN (see man page for details).
Janis
Re: Is threre any Shell variable that keep the last executed command
am 14.10.2007 23:27:41 von Kenan Kalajdzic
parag_paul@hotmail.com wrote:
> I want to do something like make an alias that will send me a mail
> about the last command executed.
>
> Like
> alias tom 'set gh `!-1:p`;touch a; mail -s "done with $gh" paragp
>
> Where gh should have the last command executed.
> So that I get that message on my mobile device that the command that I
> had typed is done
Try this:
alias tom 'mail -s "Done with \!-1" paragp
--
Kenan Kalajdzic