I'm creating a script to get some images in the folder and with this generate another image, I'm using Imagemagick, but the problem I'm having is in passing one of the parameters of this script I'm putting together and gives me this error:
montage: unrecognized color '$BACKGROUND' @ warning/color.c/GetColorCompliance/1046.
Basically, I call the script and pass the color parameter, like this: ./meuScript.sh -b 00FFFF
and the script is this, I left only the necessary
#!/bin/bash
MSG_USO="
Uso: $(basename "$0") [-h | -d | -b ]
-b | --background cor de fundo da imagem gerada
"
BACKGROUND="4E9A06"
while test -n "$1"
do
case $1 in
-b | --background)
shift
BACKGROUND="$1"
;;
esac
# opção $1 já processada, a fila deve andar
shift
done
# remove montagem existente
rm Montagem.png
# cria nova montagem
montage -background '#"$BACKGROUND"' -geometry +4+4 *.jpg Montagem.png