if error_msg=$(cksum filename 2>&1); thenでCRCエラーが発生したファイルを条件分岐させて、出力された文字列からパスを取得できる updated: 2025/10/14 created: 2025/10/14