On Fri, Jun 30, 2023 at 04:34:08AM +0200, alex xmb ratchev wrote:
> -k All arguments in the form of assignment statements are
> placed in the environment for a command, not just
> those
> that precede the command name.
>
> its not echo $yo yo=7
> nor yo=7 echo $yohttps://mywiki.wooledge.org/BashFAQ/104
Your example is flawed, as explained on that page. You need to use a
command that actually *uses* the yo environment variable.
unicorn:~$ awk 'BEGIN {print ENVIRON["yo"]}' yo=7
unicorn:~$ set -k
unicorn:~$ awk 'BEGIN {print ENVIRON["yo"]}' yo=7
7
I've never seen anyone use this set -k "feature". I cannot see any good
reason for it to continue to exist. Looks extremely legacy-ish.