bug-bash
[Top][All Lists]
Advanced

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

Re: possible in bash?: filter stderr of a prog & send filtered-output ou


From: Dennis Williamson
Subject: Re: possible in bash?: filter stderr of a prog & send filtered-output out on stderr leaving stdout untouched
Date: Tue, 6 Dec 2016 16:30:16 -0600



On Tue, Dec 6, 2016 at 4:09 PM, L A Walsh <address@hidden> wrote:

Is there a way, in bash, to filter stderr and let the
filtered result continue on stderr with the original
stdout being output on stdout?

with prog being the program to filter, and RE_filt being the
filtering _expression_, conceptually, I wanted to do something
like this:

$prog >&3 2>&1 |grep -v "$RE_filt" >&2 3>&1

(which of course doesn't work)....

Is it possible/doable?

Tnx!
-l






http://mywiki.wooledge.org/BashFAQ/047 (search for "stdout intact")


 



--
Visit serverfault.com to get your system administration questions answered.

reply via email to

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