Am Dienstag, 1. Dezember 2015, 21:48:52 schrieb Ander Juaristi:
> On 12/01/2015 09:31 AM, Tim Ruehsen wrote:
> > Are you working on *nix ?
> >
> > Try wget ... |& grep -v "WARNING: cannot verify"
> >
> > To filter out the warnings you don't want to see. You could use egrep to
> > filter different lines at once.
>
> That's a good idea but IMO it's a bit hackish. What's more, I think `|&'
> it's not a *nix feature, but rather a Bash feature.
>
> It's basically `2>&1 |' behind the scenes, but worth pointing it out, anyway
> [1].
>
> [1] http://www.gnu.org/software/bash/manual/bashref.html#Pipelines
You are right, it's a bashism. Doesn't work with dash.
But what works also with dash is
#!/bin/dash
{ wget -d xxx 2>&1 1>&3 | grep -v Saving 1>&2; } 3>&1
Found it here:
http://unix.stackexchange.com/questions/3514/how-to-grep-standard-error-stream-stderr
Tim