Re: Execute all processes in the background from bash.
From: Alan Connor (zzzzzz_at_xxx.yyy)
Date: 05/19/04
- Next message: Christopher M. Lusardi: "How To Make Shared Memory (mmap woun't do it!) Aliased To Pre-Existing C Struct Memory?"
- Previous message: guerrilla_thought: "Execute all processes in the background from bash."
- In reply to: guerrilla_thought: "Execute all processes in the background from bash."
- Next in thread: Timo Felbinger: "Re: Execute all processes in the background from bash."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 19 May 2004 09:31:38 GMT
On Wed, 19 May 2004 08:33:06 GMT, guerrilla_thought <guerrilla_thought@gmx.de> 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.
>
> * Anthony
One way would be to use the PROMPT_COMMAND Bash variable to run a function
just before the prompt came up:
function_name () {
read PC
time "${PC}" &
}
Doesn't really run in the background, though, and I can't make common
commands run in the background at all. Try ls & ...
Of course, that function takes away your prompt, so you need to
include one in the function...
Hang around. There are probably better ideas coming along...
AC
-- Pass-List -----> Block-List ----> Challenge-Response The key to taking control of your mailbox. Design Parameters: http://tinyurl.com/2t5kp || http://tinyurl.com/3c3ag Challenge-Response links -- http://tinyurl.com/yrfjb
- Next message: Christopher M. Lusardi: "How To Make Shared Memory (mmap woun't do it!) Aliased To Pre-Existing C Struct Memory?"
- Previous message: guerrilla_thought: "Execute all processes in the background from bash."
- In reply to: guerrilla_thought: "Execute all processes in the background from bash."
- Next in thread: Timo Felbinger: "Re: Execute all processes in the background from bash."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|