trying to create a bash script that will shrink jpegs that are larger than 50kb in a directory on my server.
Here's what I've got so far, very early in the process...
the if line errors out with a "command not found". oops.
anyone have any thoughts here for the noob bash scripter?
for FILENAME in *.jpg #traverse filenames...
FILESIZE=$(stat -c%s "$FILENAME")
if ["$FILESIZE" > 50000]
echo "$FILENAME is too large = $FILESIZE bytes."