[OT] - Bash question: get output as a variable?
On Fri, 5 Feb 2010 10:44:28 -0500 (EST), bruno wrote:
> Ken Teague wrote:
>> On Fri, Feb 5, 2010 at 12:39 AM, bruno <bruno.debian@cyberoso.com> wrote:
>>
>>> Why not simply use the t option for content listing :
>>>
>>> tar tvf * --exclude-from $EXCLUDES
>>>
>>
>> He's already creating the archive with -v. Why process the archive a
>> 2nd time just to get a listing when it comes from stdout the 1st time?
>>
>>
>>
> because it's a simplier way to get the list into a variable
> because the script gets much clearer
> because it is not safe to rely on stderr since it is supposed to display
> errors, which it might do as well
> because he would get the list of the files that have really been
> compressed, not just the processed ones
> because the overhead may not be worth the complication of trying to do
> both things at the same time
> because he might as well never use the v option (it's not useful in my
> proposition either, and it would even reduce the overhead)
>
> because it is another way to do it and nobody had proposed it before
This is off topic from the OP's question, but one of the things that I
miss in the Linux environment that I used to use a lot in the CMS
environment is CMS Pipelines. The shell supports pipelines, but they
are *single-stream* pipelines. CMS pipelines supports *multi-stream*
pipelines. That one feature alone makes CMS Pipelines so much more
powerful than shell pipelines. I wish the shell supported multi-stream
pipelines.
Reply to: