Bash question - redirect stderr to a variable

Steven Bailey st3venb at gmail.com
Tue Mar 15 17:26:33 MST 2011


Would var=$(something &2>1) work?

Thoughts
On Mar 15, 2011 3:21 PM, "Kevin Fries" <kfries6 at gmail.com> wrote:
> On 03/15/2011 04:01 PM, Ben Trussell wrote:
>> This might be helpful (and by that I mean mostly not helpful - you can
>> easily send stderr to a file then input a file into a variable
>> however).
>>
>>
http://stackoverflow.com/questions/962255/redirecting-stderr-to-a-variable-in-a-bash-script
> Also, have you seen this?
>
>
http://www.linuxquestions.org/questions/programming-9/bash-input-output-redirect-problem-515156/
>
> It does a similar process but uses a fifo queue.
>
> Kevin
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20110315/9a58b655/attachment.html>


More information about the PLUG-discuss mailing list