[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Directing into a variable doesn't work

From: Peter Passchier
Subject: Directing into a variable doesn't work
Date: Sun, 24 Jun 2018 10:08:24 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

With memory being abundant and filesystem access expensive, I want to
put stdout and stderr of a command into variables (without needing to
write to a file):

output=$($command 2>>>errors)


$command >>>output 2>>>errors

Obviously this gives a syntax error now, as this intuitive idea isn't
implemented (yet). Any chance for a fix, to introduce an operator >>>
that functions as a "reverse here-document" that stores the content of a
file stream into a variable?

I think that would be very useful extension, easy to comprehend in the
light of current syntax, and not clashing with anything existing as far
as I can see.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]