The following works with or w/o the "external" quotes:
The following returns the correct result, only if there are no
"external" quotes(as shown):
Would like to understand what is going on here when "external"
quotes a present.
The following does not produce any errors, but it also doesn't return
the intended output, with or w/o "external" quotes:
I thought this was the proper use of zsh tools, but since it isn't
returning the intended results, it must be incorrect. Any thoughts
on what I am doing wrong and or assumptions made?
Also, depending on patterns, subscripts, and in one known case, quoting;
the results returned are all over the place. It could be a "blank line",
or the last field of the last line of the passwd file, or the last field
of the first line + the first field of the second line, or the entire
line for $USER.
Note, if your USER entry is the last line of the passwd file, you can
get the correct results, even though the code is wrong. Found this the
Any pointers as to how to proceed to understand what is going on would
be appreciated. Thanks in advance.
My distributions currently distributes ZSH_VERSION 5.3.1.
P.S. The attached script shows the variations I've tried.
I don't expect anyone to fix any incorrect scripting,
that's on me.