[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: execution hook
From: |
eneville_ |
Subject: |
Re: execution hook |
Date: |
Tue, 13 Jan 2009 05:06:12 -0800 (PST) |
Bob Proulx wrote:
>
> eneville_ wrote:
>> I was looking for a way to run a program prior to bash executing the
>> program. Does anyone know of a hook that can do this, such as an
>> environment
>> that hold this hook value.
>
> Look at the documentation for BASH_ENV in the bash manual.
>
> When bash is started non-interactively, to run a shell script,
> for
> example, it looks for the variable BASH_ENV in the environment,
> expands
> its value if it appears there, and uses the expanded value as the
> name
> of a file to read and execute. Bash behaves as if the following
> com-
> mand were executed:
> if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
> but the value of the PATH variable is not used to search for the
> file
> name.
>
> Bob
>
Thanks. But this isn't having the effect that I wished for.
What I'm hoping to achieve is to have bash run something like a wrapper
around each and every command line that I run.
For example, if I issue the command 'ls' I want bash to run something first,
with ls as the argument. Does that make more sense?
-----
http://www.s5h.net/ http://www.s5h.net/
--
View this message in context:
http://www.nabble.com/execution-hook-tp21425515p21435288.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.