Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
${<file} (Was: [PATCH?] Nofork and removing newlines)
By the way, if ${ cmd } preserves trailing newlines, it would
be useful to also have ${<file} as a variant of $(<file) that
preserves trailing newlines (and remove the need for a zslurp).
"${ <file}" already does but that's via running $READNULLCMD so
that could be optimized.
ksh93 and mksh both support optimised ${ <file;} (also ${<file;}
in ksh93), but they do trim trailing newline characters so
AFAICT, they're no different from $(<file).
See also the
$(<<'EOF'
multi-line
text
EOF)
of mksh which actually skips the creation of the here-doc and is
in effect a form of multi-line quoting (though also trims
trailing newlines). Also works with:
${ <<'EOF'
multi-line
test
EOF
}
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author