Paul D. Smith wrote:
> This isn't a bug, actually. I'm wondering if there's any way to access
> the string provided with the -c option to the shell, from within the
> shell init files.
>
>
> For example, if I run this;
>
> bash --login -c 'echo hi'
>
> How can I find the string 'echo hi' from within my ~/.bash_profile? I
> tried the obvious but it isn't in $@ and it's not sitting in stdin
> waiting for me. Is there any way to retrieve that string from within my
> shell setup?
The $BASH_EXECUTION_STRING variable exists in bash-3.0 for this purpose.
The $BASH_COMMAND variable may also be used, but that will probably be
overwritten before you can make any use of it.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Live...Laugh...Love
Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://cnswww.cns.cwru.edu/~chet/
_______________________________________________
Bug-bash mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-bash