Feature idea

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Feature idea

Peter & Kelly Passchier
Recently I wanted to put the content of the stdout and the stderr of a
command into variables (without needing to write to a file), something
like this:

sterr=$(cmd >>>stout)


stout=$(cmd 2>>>sterr)

Or even:

cmd >>>stout 2>>>sterr

Obviously the idea is to introduce an operator >>> that functions as a
"reverse here-document" that stores the content of a file stream into a
variable. There would be less need to store things in a file on a

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

Thanks for considering this,