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

Andy Schwierskott andy.schwierskott at sun.com
Fri Jul 2 13:00:10 BST 2004


Reuti,

you are right - we need a clear definition about allowed characters for the
"-v/-V" option.

We need to check if there are technical limitations in SGE which make it
impossible to support full the full range of environment variable
characters.

Andy

> > 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
> process,image="Reuti's.tiff",export,comment="(C),2004"
>
>
> Or similar (but uneven "):
>
> $ VAR1="process,image='Reuti\"s.tiff',export,comment=\"(C),2004\""
> $ echo $VAR1
> process,image='Reuti"s.tiff',export,comment="(C),2004"
>
> $ touch Reuti\"s.tiff
> $ ls Reut*
> Reuti"s.tiff
> $
>
>
> 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.
>
>
> Reuti
>
>
> 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