[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Feature idea
From: |
PePa |
Subject: |
Feature idea |
Date: |
Mon, 27 Nov 2017 22:11:12 +0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
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)
Or:
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
filesystem.
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,
Peter
[Prev in Thread] |
Current Thread |
[Next in Thread] |