Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Fwd: more splitting travails




On 2024-01-12 19:06, Ray Andrews wrote:

 I'm going to read more often, it's  good for the mind and the sanity:

1 /aWorking/Zsh/Source/Wk 0 % read -rd '' < testfile2 aaa

1 /aWorking/Zsh/Source/Wk 0 % print $aaa    # No " ${aaa[@]} " required!
one two
three

four

five six seven


eight

1 /aWorking/Zsh/Source/Wk 0 % varis ,m aaa ! this is comment    # I can pass the name of the array without the dollar, as I usually do, and:

zsh():327 in: zsh:327 > "$aaa" is:
one two
three

four

five six seven


eight
! this is comment - 19:27:02

... I get my blanks.  All this is how God meant it to be.  No grief.   It couldn't be simpler.

And if 'read' had an option to keep even trailing blanks, one would have squeaky-clean literal, perfect copies.  It's a matter of principle.

Thank you gentlemen.







Messages sorted by: Reverse Date, Date, Thread, Author