$ app > log.file 2>&1
If you want to send everything to a black-hole just replace
log.file
with /dev/null
.$ app > /dev/null 2>&1
If ever confused about the syntax, do
man bash
and search for REDIRECTION
for more gyanUpdate:
It is good idea to use tee, which lets you see the output as well as write it to a file.
$ app 2>&1 | tee file.log
No comments:
Post a Comment