Extract text from gimp xcf files

384 Views Asked by At

I can't get out from lisp, to pass to bash, in the same script...

 #!/bin/bash
{
gimp -n -i -b - <<EOF
(let* ( (file's (cadr (file-glob "*.xcf" 1))) (filename "") (image 0) (number 0) (condition 0) (testo "") )
  (while (pair? file's) 
...
  (gimp-quit 0)
  )
EOF
}

echo $testo;
1

There are 1 best solutions below

1
On

The value of testo in your gimp code will not be reflected in your shell's environment. To do that, you would need to print the value and capture the output.

The general way of doing that in shell is var=$(command) (this sets the value of var to the standard output from command).