On 5/21/18 Chet Ramey wrote:
> What you're asking for is syntactic sugar for: > some-command > temp-file > echo '#' >> temp-file > variablename=$(< temp-file) > rm -f temp-file > variablename=${variablename%?} > I would look at a sample implementation, possibly using mmap, if someone did one. Could someone please explain the reason for inserting and removing the # character. It is as if to ensure temp-file is non-empty but it seems to me it would work anyway.