下面是shell脚本的部分代码,改代码段是并发 gpg 加密
echo "gpg start...`date` " #并发加密文件,缩短执行时间 for FILE in `ls -1 /backup/base*.tgz` do ( gpg -er postgres -o ${FILE}.gpg ${FILE} )& done wait echo "gpg end...`date` "