How to print out error messages into terminal screen while doing pipes (linux bash) -


in linux bash terminal, command want run of form: cmd | cmd2 > somefile.txt.

however, want error message in cmd shown in terminal screen. different redirecting stderr stdout. way this?

error messages written standard error not sent piped command. mean if command is:

cmd | cmd2 

then stdout messages cmd piped cmd2 , not stderr messages.

here example used. tried cating non-existing file , tried greping text:

$ cat non-existing-file.txt | grep > grepped-text.txt cat: non-existing-file.txt: no such file or directory 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -