output to /dev/null in shell script for multiple processes
I am modifying a cron script that was created by another user. The script tars and gzips a directory and then encrypts the file. The prior user had separate lines, one for creating the tarball and one for encrypting the file.
For ease of maintenance and clarity, I have combined these into one line of code:
tar pcz /directory/ | openssl des3 -salt -k password > /backupdir/file.tar.gz.des3 >> /dev/null 2>&1
This works fine, but sends output from the tar process to the screen. In this case, one line "tar: Removing leading `/' from member names"
Anyone know how I can also send the tar output to /dev/null?
|