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 cat
ing non-existing file , tried grep
ing text:
$ cat non-existing-file.txt | grep > grepped-text.txt cat: non-existing-file.txt: no such file or directory
Comments
Post a Comment