[GE users] Re:[GE users] TR : variable syntax : equal sign support ?

Reuti reuti at staff.uni-marburg.de
Fri Jul 2 00:51:19 BST 2004

    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some special characters may be displayed incorrectly. ]

> this is a bug. Environment variables in Unix may contain a "=", so Grid
> Egnine also needs to support it.

We should define, what values are allowed to be assigned. The main intention of 
-v was (I assume according to the documentation) to get some 'simple' 
information to the start/stop procedure of a PE. If we want to support every 
valid Unix variable contents, we have to support something like this:

VAR1 should be: process,image="Reuti's.tiff",export,comment="(C),2004"
VAR2 should be: status=keep

Shell command, so it's a valid string:

$ VAR1="process,image=\"Reuti's.tiff\",export,comment=\"(C),2004\""
$ echo $VAR1

Or similar (but uneven "):

$ VAR1="process,image='Reuti\"s.tiff',export,comment=\"(C),2004\""
$ echo $VAR1

$ touch Reuti\"s.tiff
$ ls Reut*         

There should be a note in the qsub documentation, what's really 
allowed/possible. Maybe, we should simply limit -v to one assignment per call, 
and for a second variable you need -v a second time in the qsub command. Then 
the shell will process it for us.


PS: If there is at least one " in the -v string, the string_list() procedure 
gets confused and you end up in:

qsub -v VAR1=\"\",VAR2=KEEP dummy.sh

VAR1 is "",VAR2
VAR2 is

(yes, VAR2 is empty)

I had a look at string_list() in sge_strings.c. It seems, that the end of the 
first string (the second " in the command) is also counted as beginning of a 
second quoted part.

To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net

More information about the gridengine-users mailing list