Re: Execute all processes in the background from bash.
From: Timo Felbinger (Timo.Felbinger_at_physik.uni-potsdam.de)
Date: 05/19/04
- Previous message: David Douthitt: "Re: "No Shell""
- In reply to: guerrilla_thought: "Execute all processes in the background from bash."
- Next in thread: Doug Freyburger: "Re: Execute all processes in the background from bash."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 19 May 2004 19:01:05 +0200
On Wed, 19 May 2004, guerrilla_thought wrote:
> I was wondering if it's possible to prepend "time" and append "&" to all
> commands that I execute in bash. For example I'd like
> $ mozilla
> to exapand to
> $ time mozilla &
> to time it and execute it in the background. Anyone know if this is
> possible using bash, maybe with environment variables? It's quite
> inconvenient to type time before and & after every command that I execute.
> Thank you.
>
If your bash is using GNU-readline for obtaining user input (it probably
does), then you could add something similar to the following into your
~/.inputrc:
'\C-a': beginning-of-line
'\C-e': end-of-line
'\C-n': accept-line
'\C-m': "\C-a time \C-e &\C-n"
See the readline man page for more details.
Regards,
Timo Felbinger
-- Timo Felbinger <Timo.Felbinger@physik.uni-potsdam.de> Quantum Physics Group http://www.quantum.physik.uni-potsdam.de Institut fuer Physik Tel: +49 331 977 1793 Fax: -1767 Universitaet Potsdam, Germany
- Previous message: David Douthitt: "Re: "No Shell""
- In reply to: guerrilla_thought: "Execute all processes in the background from bash."
- Next in thread: Doug Freyburger: "Re: Execute all processes in the background from bash."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|