I am trying to incorporate a gimp batch script into a bash script.
The gimp command have to use single quotes
gimp -i -b '(my-script "script-argument")' -b '(gimp-quit 0)'
It does not accept double quotes.
The problem is that i need to pass a bash variable as an argument to my gimp function.
I tried this:
gimpcmd="gimp -i -b '(batch-coelipse \"$filename\")' -b '(gimp-quit 0)'"
But it throws an error as if the end of the variable $filename ended with a )
I also played around with it on the command line. It works if I echo the $gimpcmd, copy the output and run it as a command. But it fails if I try too run $gimpcmd as a command.
Does anyone know how to throw a variable in between two single quotes in a bash script?