Suppress message from zip
I would to suppress the error message when there are no doc files present.
I have this, but it does not work. Code:
zip -u Linux_Documents *.txt *.doc *.rtf 2&>1 > /dev/null |
You have the ampersand and the redirection in the wrong places. Note the ampersand follows the bracket.
Try Code:
zip -u Linux_Documents *.txt *.doc *.rtf > /dev/null 2>&1 The post below mine redirects only stderr to /dev/null. So if there's output to stdout you will see it. My example above will redirect both stderr and stdout to /dev/null so you will get no output whatsoever. |
have you tried
Code:
zip -u Linux_Documents *.txt *.doc *.rtf 2>/dev/null |
Thanks guys.
Script is working right. Andy |
All times are GMT -5. The time now is 04:30 AM. |