Greetings
I have the following 2 scripts.
If I run script
devput from the commandline. everything is fine.
However I am now trying to write a wrapper script that allows me to provide a file with the files I want to devput. This doesnt work as it does not seem to recognise the parameters?
Could anyone explain why? I am doing my own head in!
mput script
#!/usr/bin/ksh
LISTFILE=$1
comments=$2
mrs=$3
tty >/dev/null
# Loop over LISTFILE
while read FILENAMEdo
devput ${mFILENAME} -y "${comments}" -m ${mrs}
done < $LISTFILE
devput
#!/usr/bin/ksh
typeset -Z6 mrs
FILENAME=$1
shift
while getopts m:y: OPTION "$@" 2>/dev/null
do
case ${OPTION} in
m) MRS=${OPTARG};;
y) COMMENTS=${OPTARG};;
*) print ${USAGE}
exit 1
esac
done
echo "FILENAME: ${FILENAME}"
echo "COMMENTS: ${COMMENTS}"
echo "MRS : ${MRS}"
Results from command line
devput listfile -y "simon test" -m 009299
FILENAME: listfile
COMMENTS: simon test
MRS : 009299
Results from mput
mput listfile "simon test" 009299
FILENAME: file2
COMMENTS: "simon
MRS :
WHY WHY WHY????
I have been trying all day. I am sure this is simple, but I cant see the wood for the trees.
Please help a frustrated man
again
Cheers
Si