Re: Execute all processes in the background from bash.

From: Timo Felbinger (Timo.Felbinger_at_physik.uni-potsdam.de)
Date: 05/19/04

  • Next message: Doug Freyburger: "Re: Execute all processes in the background from bash."
    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
    

  • Next message: Doug Freyburger: "Re: Execute all processes in the background from bash."

    Relevant Pages

    • Re: Execute all processes in the background from bash.
      ... > commands that I execute in bash. ... > to time it and execute it in the background. ... commands run in the background at all. ... Of course, that function takes away your prompt, so you need to ...
      (comp.unix.admin)
    • Re: Execute all processes in the background from bash.
      ... > commands that I execute in bash. ... > to time it and execute it in the background. ... commands run in the background at all. ... Of course, that function takes away your prompt, so you need to ...
      (comp.unix.questions)
    • Re: Execute all processes in the background from bash.
      ... > commands that I execute in bash. ... > to time it and execute it in the background. ... > inconvenient to type time before and & after every command that I execute. ...
      (comp.unix.questions)
    • Re: Execute all processes in the background from bash.
      ... > commands that I execute in bash. ... > to time it and execute it in the background. ... Then I would type most of my commands normally and "x mozilla". ...
      (comp.unix.questions)
    • [UNIX] Vulnerabilities Found in Scponly
      ... SSHd environment files. ... the user can upload a file with a custom ... This provides the user with a means of running arbitrary commands ... the user could execute arbitrary commands by uploading ...
      (Securiteam)

  • Quantcast