我想用的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這就是我要找的。謝謝 :) –