i am somewhat forced to use an environmet i am really not used to. I have a large prepare script that generates a jobscript for our cluster. I stripped out a minimal example that shows what is not working right now.
#! /bin/ksh
EXPDIR="/home/user1/tmp/exp"
EXPNO="${testno}"
if [ ! -d "$EXPDIR" ]; then
/client/bin/mkdir -p "${EXPDIR}"
cd "${EXPDIR}"
fi
jobname="${jobname:-${EXPNO}}"
jobfile="${jobfile:-${EXPDIR}/${jobname}.job}"
cat >"${jobfile}" <<EOF1
#-----------------------------------------------------------------------------
# TEST
#-----------------------------------------------------------------------------
This script should create a file called testno.job containing
#-----------------------------------------------------------------------------
# TEST
#-----------------------------------------------------------------------------
in the directory /home/user1/tmp/exp and create the directory if it is not existing. The only problem is that the file is not called testno.job but .job. Can you help me out?