[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[HTCondor-users] Default value for attributes from environment variables in submit file



Hi all,
in a submit file I can refer to the environment using
$ENV(VAR_NAME)
If this is unset ENV returns UNDEFINED.
Iâd like to have a default value.

All that I tried is not working:
1- this is not valid. Is interpreted as string:
$ENV(MY_PATH:/default/path)

2- this gives UNDEFINED (MY_PATH is not set. If set this works)
path_attribute = $ENV(MY_PATH)
path_with_default = $(path_attribute:/default/path)

3- this expression is not evaluated (holds job):
path_attribute = $ENV(MY_PATH)
path_with_default = $$([isUndefined(path_attribute)])


Is it there any way to have an attribute with the content of MY_PATH if this is set and a default value if this is not set?

Thank you,
Marco