Re: BPXWUNIX Improvements

2019-11-09 Thread Paul Gilmartin
On Sat, 9 Nov 2019 14:13:31 +0800, David Crayford  wrote:
>...
>> If that's the UNIX/shell command "env", use some caution because its
>> output may not have metacharacters in variable values properly quoted.
>> "export -p" does better.
>
>Do you have an example of "env" with the meta-characters issue?
>
>Maybe "printenv" would be better as it only has one purpose. The trouble
>with "export -p" is that the output needs to be parsed and reformatted
>before it can be used in a environment variable stem.
>
Consider:
( set -x; export wombat="foobar
xyzzy=barfoo"; env; export -p; printenv ) | grep foo

wombat=foobar
xyzzy=barfoo

export wombat="foobar
xyzzy=barfoo"

wombat=foobar
xyzzy=barfoo

... none of them produces Rexx-friendly output, and only "export -p"
produces sh-friendly.

Yes, I'm wearing my Black Team cloak.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: BPXWUNIX Improvements

2019-11-08 Thread David Crayford

On 2019-11-09 10:21 AM, Paul Gilmartin wrote:

On Fri, 8 Nov 2019 21:04:28 +0800, David Crayford wrote:

Lionel came up with the best solution which was to run "env" and then to
use the result stem for all the other bpxwunix() calls! Great tip!


If that's the UNIX/shell command "env", use some caution because its
output may not have metacharacters in variable values properly quoted.
"export -p" does better.


Do you have an example of "env" with the meta-characters issue?

Maybe "printenv" would be better as it only has one purpose. The trouble 
with "export -p" is that the output needs to be parsed and reformatted

before it can be used in a environment variable stem.



-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: BPXWUNIX Improvements

2019-11-08 Thread Paul Gilmartin
On Fri, 8 Nov 2019 21:04:28 +0800, David Crayford wrote:
>
>Lionel came up with the best solution which was to run "env" and then to
>use the result stem for all the other bpxwunix() calls! Great tip!
> 
If that's the UNIX/shell command "env", use some caution because its
output may not have metacharacters in variable values properly quoted.
"export -p" does better.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: BPXWUNIX Improvements

2019-11-08 Thread David Crayford

Thanks Lionel!

Lionel came up with the best solution which was to run "env" and then to 
use the result stem for all the other bpxwunix() calls! Great tip!


On 2019-11-08 8:27 PM, Lionel B Dyck wrote:

I want to thank  David Crayford - your suggestions on the bpxwunix
environment variables to speed up git was the right direction.  The calls
when from 10-15 seconds (we have a slow lpar) to 1-3 seconds.

  

  


Lionel B. Dyck <
Website:   http://www.lbdsoftware.com

"Worry more about your character than your reputation.  Character is what
you are, reputation merely what others think you are." - John Wooden

  



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN