I am using ksh.I need to read the data from file, into the variables and then further use them for sending emails.File can be delimited by any less used characters (like | ^ etc.) or group of characters.Need to retrieve mail from, mail to,cc,bcc, subject, body from file.File is having only one record.I am spooling into file from table, thus delimiter can be any character, but less used in general english because characters like , & * etc. might be present in Body and that may return wrong value.File: (cc and bcc are not available in the file i.e they are blank)na734@company.com|NA734@company.COM|||TEST EMAIL FOR LMS ERROR|Hi <<FIRST_NAME>>, <br><br>Following errors are generated during migration of LMS data into FIMS application.<br><br><br>The respective details of Error(s) occured is logged into the attached file.Regards,<br>FIMS Web Application<br><br><br>This is an auto-generated e-mail, please don't reply to this e-mailReply to the following person for further details:na734@company.comCode using: while IFS='|' read -r a1 a2 a3 a4 a5 a6do flag1=`echo $a1`flag2=`echo $a2`flag3=`echo $a3`flag4=`echo $a4`flag5=`echo $a5`flag6=`echo $a6`done < $RUNTIME/EMAIL_$System`date +%y%m%d`.csvIt is not setting the variables.And when using code below: It is showing undesired output:while IFS='|' read -r a1 a2 a3 a4 a5 a6do echo $a1echo $a2echo $a3echo $a4echo $a5echo $a6done < $RUNTIME/EMAIL_$System`date +%y%m%d`.csvOutput: (Hell lot of blank lines)na734@company.comNA734@company.COMTEST EMAIL FOR LMS ERRORHi <<FIRST_NAME>>, <br><br>Following errors are generated during migration of LMS data into FIMS application.<br><br><br>The respective details of Error(s) occured is logged into the attached file.Regards,<br>FIMS Web Application<br><br><br>This is an auto-generated e-mail, please don't reply to this e-mailReply to the following person for further details:na734@company.com
Read from character delimted file and assign into variables | for email
files;ksh;variable;read