#!/bin/sh ################################################################# # envllsubmit - Utility called by prodllsubmit to read environment # variable=value pairs from standard input, and to # export any of those shell variables that are not # currently set, so that they can be passed on to # the load leveler job submitted at the end of the # script. # # History: 04/14/00 (Gilbert) - Created for IBM SP # ################################################################# # # Usage: envllsubmit [script_name] # set -x script_name=$1 if test $# -ne 1 then set +x echo "Usage: envllsubmit [script_name]" echo " script_name - full path/script name" echo "" exit set -x fi oldstring="" while read string do echo $string | grep "=" if [ $? -eq 0 ] ; then var=`echo $string | cut -d"=" -f1` printenv $var if [ $? -ne 0 ] then export "$string" fi oldstring=$string else oldstring=`echo $oldstring" "$string` export "$oldstring" fi done /usr/lpp/LoadL/full/bin/llsubmit $script_name exit $?