<commit_before>#!/bin/bash
#
# Project:
#   glideinWMS
#
# File Version: 
#   $Id: job_submit.sh,v 1.6.8.3 2011/01/26 19:03:32 parag Exp $
#

export GLIDEIN_USER=`id -u -n`

if [ $# -lt 4 ]; then
 echo "At least 4 args expected!" 1>&2
 echo "Usage: job_submit.sh entry_name client x509_sec_class x509_id count [attrs]* -- [params]*"
 1>&2
 exit 1
fi
GLIDEIN_ENTRY_NAME="$1"
shift
export GLIDEIN_CLIENT="$1"
shift
export GLIDEIN_X509_SEC_CLASS="$1"
shift
export GLIDEIN_X509_ID="$1"
shift
export GLIDEIN_COUNT=$1
shift
GLIDEIN_PARAMS=""
while [ "$1" != "--" ]; do
 GLIDEIN_PARAMS="$GLIDEIN_PARAMS $1"
 shift
done
shift # remove --
while [ $# -ge 2 ]; do
 GLIDEIN_PARAMS="$GLIDEIN_PARAMS -param_$1 $2"
 shift
 shift
done
export GLIDEIN_PARAMS

export GLIDEIN_SCHEDD=`grep -i "^Schedd "  entry_${GLIDEIN_ENTRY_NAME}/job.descript | awk '{print $2}'`
export GLIDEIN_VERBOSITY=`grep -i "^Verbosity "  entry_${GLIDEIN_ENTRY_NAME}/job.descript | awk '{print $2}'`

export GLIDEIN_LOGNR=`date +%Y%m%d`

log_base_dir=`grep -i "^ClientLogBaseDir " glidein.descript | awk '{print $2}'`
glidein_name=`grep -i "^GlideinName " glidein.descript | awk '{print $2}'`
log_dir="${log_base_dir}/user_${GLIDEIN_USER}/glidein_${glidein_name}/entry_${GLIDEIN_ENTRY_NAME}"
error_log_fname="${log_dir}/submit_${GLIDEIN_LOGNR}_${GLIDEIN_CLIENT}.log"

echo "`date '+%y/%m/%d %H:%M'` Submitting ${GLIDEIN_COUNT} glideins using X509 id ${GLIDEIN_X509_ID=}" >> "$error_log_fname"
condor_submit -name $GLIDEIN_SCHEDD entry_${GLIDEIN_ENTRY_NAME}/job.condor 2>> "$error_log_fname"
<commit_msg>Converted the rsl string to be an env variable.<commit_after>#!/bin/bash
#
# Project:
#   glideinWMS
#
# File Version: 
#   $Id: job_submit.sh,v 1.6.8.4 2011/04/26 16:12:57 klarson1 Exp $
#

export GLIDEIN_USER=`id -u -n`

if [ $# -lt 4 ]; then
 echo "At least 5 args expected!" 1>&2
 echo "Usage: job_submit.sh entry_name client x509_sec_class x509_id count glidein_rsl [attrs]* -- [params]*"
 1>&2
 exit 1
fi
GLIDEIN_ENTRY_NAME="$1"
shift
export GLIDEIN_CLIENT="$1"
shift
export GLIDEIN_X509_SEC_CLASS="$1"
shift
export GLIDEIN_X509_ID="$1"
shift
export GLIDEIN_COUNT=$1
shift
export GLIDEIN_RSL=$1
shift
GLIDEIN_PARAMS=""
while [ "$1" != "--" ]; do
 GLIDEIN_PARAMS="$GLIDEIN_PARAMS $1"
 shift
done
shift # remove --
while [ $# -ge 2 ]; do
 GLIDEIN_PARAMS="$GLIDEIN_PARAMS -param_$1 $2"
 shift
 shift
done
export GLIDEIN_PARAMS

export GLIDEIN_SCHEDD=`grep -i "^Schedd "  entry_${GLIDEIN_ENTRY_NAME}/job.descript | awk '{print $2}'`
export GLIDEIN_VERBOSITY=`grep -i "^Verbosity "  entry_${GLIDEIN_ENTRY_NAME}/job.descript | awk '{print $2}'`

export GLIDEIN_LOGNR=`date +%Y%m%d`

log_base_dir=`grep -i "^ClientLogBaseDir " glidein.descript | awk '{print $2}'`
glidein_name=`grep -i "^GlideinName " glidein.descript | awk '{print $2}'`
log_dir="${log_base_dir}/user_${GLIDEIN_USER}/glidein_${glidein_name}/entry_${GLIDEIN_ENTRY_NAME}"
error_log_fname="${log_dir}/submit_${GLIDEIN_LOGNR}_${GLIDEIN_CLIENT}.log"

echo "`date '+%y/%m/%d %H:%M'` Submitting ${GLIDEIN_COUNT} glideins using X509 id ${GLIDEIN_X509_ID=}" >> "$error_log_fname"
condor_submit -name $GLIDEIN_SCHEDD entry_${GLIDEIN_ENTRY_NAME}/job.condor 2>> "$error_log_fname"

{'fraction_non_alphanumeric': 0.1599374021909233, 'fraction_numerical': 0.03693270735524257, 'mean_word_length': 5.978165938864628, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2112269', 'n_tokens_mistral': 1415, 'n_tokens_neox': 1327, 'n_words': 272}