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