[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] pass command to script
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] pass command to script |
Date: |
Thu, 25 Apr 2019 15:59:59 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 4/25/19 3:00 PM, Eric Blake wrote:
> Am I recalling correctly that at one point, there was an experiment made
> where the shell was patched to export an environment variable describing
> which portions of the command line were typed directly vs. which parts
> were quoted or otherwise resulted from expansions, so that the invoked
> application could read that environment variable to reconstruct a
> properly quoted command line that would have the same behavior?
No, that's not quite correct, and man, that was a long time ago.
The variable was introduced in bash-2.0. It was named something like
"_<pid>_GNU_nonoption_argv_flags_" where <pid> was the pid of the child
process about to be executed, and it was basically a bitmap corresponding
to the words in argv with a `1' meaning the word was the result of pathname
expansion and 0 if not.
My notes from way back then indicate that it was for Roland's custom glibc
getopt(). It finally disappeared in bash-4.3 (January, 2013), since all the
code that might possibly have used it was long dead.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU address@hidden http://tiswww.cwru.edu/~chet/
- [Help-bash] pass command to script, Warlich, Christof, 2019/04/26
- Re: [Help-bash] pass command to script, Warlich, Christof, 2019/04/26
- Re: [Help-bash] pass command to script, Greg Wooledge, 2019/04/26
- Re: [Help-bash] pass command to script, Chet Ramey, 2019/04/26
- Re: [Help-bash] pass command to script, Warlich, Christof, 2019/04/26
- Re: [Help-bash] pass command to script, Chet Ramey, 2019/04/26
- Re: [Help-bash] pass command to script, Warlich, Christof, 2019/04/26
- Re: [Help-bash] pass command to script, Greg Wooledge, 2019/04/26
- Re: [Help-bash] pass command to script, Christof Warlich, 2019/04/26
- Re: [Help-bash] pass command to script, Chet Ramey, 2019/04/26