title: How to cc a maillist in mailx command
body: <p>I had prepared a cc maillist as below:</p>
  
  <pre><code>/appl/tracker/TEST&gt; more abc.maillist
  xyz@yahoo.com, a123@gmail.com, abc@xyz.com
  </code></pre>
  
  <p>And a to maillist as below:</p>
  
  <pre><code>/appl/tracker/TEST&gt; more Servicedesk.maillist
  123@gmail.com
  </code></pre>
  
  <p>My script is <code>ab.sh</code> which will call the <code>mailx</code> command and send an email. This should send email to <code>cc_list</code> keeping the id's in cc and <code>to_list</code> placing the id provided in the list in to list.</p>
  
  <pre><code>/appl/tracker/TEST&gt; more ab.sh
  #!/bin/ksh
  l_date=`date +%d%m%y`
  CC_LIST=`cat /appl/tracker/TEST/abc.maillist`
  TO_LIST=`cat /appl/tracker/TEST/Servicedesk.maillist`
  MY_Q="'"
  
  cc_list="$MY_Q$CC_LIST$MY_Q"
  
  echo $cc_list
  
  BODYFILE='Please find attached file having my details.Test mail'
  
  echo $CC_LIST
  echo $TO_LIST
  
  mailx -s 'HI'  -c $cc_list $TO_LIST &lt;&lt;-EOF
  `echo $BODYFILE`
  EOF
  
  /appl/tracker/TEST&gt;
  </code></pre>
  
  <p>Output:</p>
  
  <p>There is an error being occured stating that there is an unbalanced <code>"</code>.
  Can anyone please help me getting the solution for this.</p>