> /dev/null : Redirects standard output to /dev/null, discarding it.
2>&1 : Redirects standard error to the same location as standard output. This ensures that both
standard output and standard error are discarded.
script.sh > script.log 2>&1
to prevent errors :-
command or script > /dev/null 2>&1
No comments:
Post a Comment