While writing a bash script to help creating polaroid thumbnail using Imagick\'s convert commmand. I encounter a problem. Although, I manage to work around with
Putting backticks around $COMMAND on the last line causes the script to try to execute the output of the command rather than the command itself.
$ c='echo hi'
$ `$c`
hi: command not found
This will work:
if [[ "$CAPTION" != "" ]]
then
convert -caption "$CAPTION" "$IN_FILE" "$OUTFILE"
else
convert "$IN_FILE" "$OUTFILE"
fi