Hello Sebastien,
A simple solution (on linux at least) could be to quote the variable list.
Protecting the list with single or double quotes will escape the ";". Another, less elegant, way would be to escape the ";" directly with a backslash (\).
For example, the following work for me to extract VITESSE UV and HAUTEUR D'EAU:
./runSELAFIN.py scan -v 'VITESSE;HAUTEUR' RES.slf
./runSELAFIN.py scan -v "VITESSE;HAUTEUR" RES.slf
./runSELAFIN.py scan -v VITESSE\;HAUTEUR RES.slf
but not
./runSELAFIN.py scan -v VITESSE;HAUTEUR RES.slf
It will try to split the instructions and complain about command HAUTEUR not being found.
So, if you want to keep the ; separator, you could simply ask the user to quote the variable list. That's really a question of taste. I think, on linux, the general philosophy is to quote separators when they are specified at the command line. For example, the cut and awk utilities can be invoqued like this:
cut -d ';' [.....]
awk -F ';' [....]
I will stay tuned for future updates in you script. They have helped me a lot to understand how to parse an slf, and save us time when transferring results over the network. Keep up the good work.
j