04-25-04 02:33 PM
MarzBarzTM <marzbarztm@candy.uk> writes:
> I can use a IF statement responding when a file is empty with:
>
> if [ ! - file1 ]; then action1 ;fi
>
> But I need a specific action when 2 specific files are empty in the
> same time then:
>
> if [ ! -s file1 -a \(! -s file2 \) ]; then action2 ;fi
>
> didn't worked and I tried a couple of variations without success. What
> is the proper form?
if [ ! -s file1 -a ! -s file2 ];then action2;fi
See the test man page.
Joe
--
If people don't want to come out to the ballpark, nobody's going
to stop them.
- Yogi Berra
[ Post a follow-up to this message ]
|