Hi,
we have a Universe database and we already know how to shell down to command line and call the shell script, but we don't know ho to modify the scripts to accept input from the program. Can you help me please??
The program uses the following syntax to call the shell script:
SIN=\"sendEmail -f \:FROM:\@gwk.co.za -t \:TO:\@gwk.co.za -u '\:SUBJECT:\' -m '\:MESSAGE:\' -a '\:ATTACHMENT:\'"\
EXECUTE \SH -c \:SIN
The script that is called:
Code:
#!/bin/bash
a=$1
foo ()
{
vlag=''
subject=''
att=''
to=''
empty='empty'
message=''
counter=1
for ARG in "$@"
do
if test "$vlag" = "$empty"
then
vlag=$ARG
else
case $vlag in
-t)
if test $counter -eq 1
then
to=$ARG
else
to=$to","$ARG
fi
counter=2;;
-a)
att=$att" -attach "$ARG;;
-u)
subject=$ARG;;
-m)
message=$ARG;;
esac
vlag="empty"
fi
done
emailstring="email -s '"$subject"' "$att" "$to
echo $emailstring
eval $emailstring
}
CAN YOU PLEASE HELP ME????