How to run something before invoking the inputted command?

2010-07-09 Thread Clark J. Wang
For example, in the interactive shell, I want to track the time when every inputted command is invoked. So I want to run a `date' command before actually invoking the inputted command. For now I have to do like this: $ date; command1 $ date; command2 Is there an easy way to do that? -Clark

Re: How to run something before invoking the inputted command?

2010-07-09 Thread Eric Blake
On 07/09/2010 09:22 PM, Clark J. Wang wrote: > For example, in the interactive shell, I want to track the time when every > inputted command is invoked. So I want to run a `date' command before > actually invoking the inputted command. For now I have to do like this: > > $ date; command1 > $ date;

Re: How to run something before invoking the inputted command?

2010-07-09 Thread Clark J. Wang
On Sat, Jul 10, 2010 at 11:30 AM, Eric Blake wrote: > On 07/09/2010 09:22 PM, Clark J. Wang wrote: > > For example, in the interactive shell, I want to track the time when > every > > inputted command is invoked. So I want to run a `date' command before > > actually invoking the inputted command.