Shell中管道命令返回值

NOTE: 本文信息轉自 Google 開源項目風格指南——Shell風格指南.檢查返回值 。侵刪!!!web 非管道 對於非管道命令,使用 $? 或直接經過一個 if 語句來檢查以保持其簡潔。shell if ! mv "${file_list}" "${dest_dir}/" ; then echo "Unable to move ${file_list} to ${dest_dir}"
相關文章
相關標籤/搜索