我想用的bash shell来压缩文件,所以我用:如何在bash中禁用“zip”警告?
echo -n 'Insert the file path:'
read path
echo 'Hello World' > ${path}
zip -u ${path}.zip ${path}
当我运行该脚本,它给了我一个警告:
zip warning: test.zip not found or empty
adding: test (deflated 66%)
它工作得很好,但我怎么能禁用此警告?我是否正确使用zip
?
+1这就是我要找的。谢谢 :) –