bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

what is wrong here?


From: Francky Leyn
Subject: what is wrong here?
Date: Wed, 28 Mar 2012 18:25:23 -0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0

Hello,

consider the following code:

EXTENSION=jpg
INPUT_FILES=*.$EXTENSION

if [ -z "$INPUT_FILES" ]; then
  echo "No .$EXTENSION input files in this directory"
  exit -1
fi

Consider a dir with some .jpg files.
the if close is not executed.
This is correct.

Consider now a dir without .jpg files.
Then the if close also isn't executed, while it should.
The script isn't exited and runs further with all wrong
actions as consequence.

What is wrong here?

Best regards,

Francky Leyn


reply via email to

[Prev in Thread] Current Thread [Next in Thread]