#!/bin/sh

set +u

if [ "$4" = "" ]
then
        echo " "
        echo "`basename $0` - Add attributes to Grid Engine objects"
        echo " "
        echo " usage: `basename $0` mod_opt attr value objects"
        echo " "
        echo "  mod_opt - a valid qconf modification option (e.g. -mq)"
        echo "  attr - the attribute in the object to be added"
        echo "  value - the new attribute value"
        echo "  objects - a list of SGE objects to be modified"
        echo " "
        exit 1
fi

export EDITOR=$SGE_ROOT/util/sge_edit_add_attr
mopt=$1
export SGE_ATTR="$2"
export SGE_ELEM="$3"
shift 3
for a in $*
do
        qconf $mopt $a
done


