tags:

views:

300

answers:

2

what condition is being checked below?

if [[ ! -s ${FILE} || -z ${FILE} ]]

(here $FILE is a data file)

+2  A: 

See the manpage for test(1). $FILE either does not exist, has zero size, or is an empty string.

Michiel Buddingh'
+1  A: 
! -s ${FILE}

checks if file exists and is not empty

-z ${FILE}

checks if the FILE string length is zero

Suvesh Pratapa