So I have a
curl that is piped to a
grep and a
Where would I apply the
>/dev/null 2>&1 ?
curl www.site.com | grep stuff | sed "other stuff"
At the very end or after the curl?
Please be more specific what is the purpose of the command. I guess you want to use
to prevent the progress indication and other stuff. -s will perform the same action but silently
If you absolutely have to use >/dev/null 2>&1 i think i would redirect curl output to the file
Just explained a bit closer:
i.e. not redirecting STDOUT, just suppressing STDERR and telling curl to only show the indended content, then piping that to grep and finally to sed.
Take care to not introduce spaces between "2>", or the 2 would rather be interpreted as additional parameter to curl ;)