I have code matching:
if [ $LAST_MODIFIED -lt 3600 || ! -f "$i" ]; then
wget $WGET_OPTS $BASE$i
LAST_MODIFIED=`echo "\`date +%s\` - \`stat -c %Y $i\`" | bc`
if [ $LAST_MODIFIED -lt 500 ]; then
$FILES_MODIFIED++
fi
fi
$i is defined via
for i in `/bin/grep ".gz" index.html | awk -F\" '{print $2}'`
however, bash tells me
[: missing `]'
and
-f: command not found
Why?
Should be
[(and!) are shell built-ins. They are not part of the syntax forif.