Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下でチェックされている条件は何ですか?
もしも [[ !-s ${FILE} || -z ${FILE} ]]
(ここで $FILE はデータファイルです)
のマンページを参照してくださいtest(1)。$FILE が存在しないか、サイズがゼロであるか、空の文字列です。
test(1)
! -s ${FILE}
ファイルが存在し、空でないか調べます
-z ${FILE}
FILE 文字列の長さがゼロかどうか調べます