0
I am creating a script to take some images in the folder and with that generate another image, I am using Imagemagick, but the problem I am having is in passing one of the parameters of this script that I am mounting 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
Valew, it worked, now I’ll study these changes, but I’m still studying Shell script
– Marcelo Diniz