Hi,
As per your command i am getting below errors.
cat /projects/psoft/hrdw/pushreports/test/cc_maillist
test.sh[41]: ${mail_body/to_maillist}: The specified substitution is not valid for this command.
Here is my part of the script.
HTML Code:
if [ -s $mail_body/cc_maillist ]
then
echo "CC_mail list exists and sending mail with CC List"
cat $mail_body/temp_body| mailx ~c $(cat $mail_body/cc_maillist | sed -e 's/ / \~c /g') -s "Hi - This is mail subject" ${mail_body/to_maillist}
dout
mailx ~c $(cat $mailbody/cc_maillist | sed -e 's/ / \~c /g')
How it will work?, As my understanding sed will replace with ~c if any
space is exists between two email id's
Dout1.As i mentioned cc_maillist file is dynamic it may contain one email id or my contain more then one email id's depends on product(business req.) .
when email id is one how it will work?
Dount2.I read and tried ~c email id is should be write before mailx command i dont understand actually.
Please do the necessary advice it needed for me.
Thanks,
Krupa