title: Markup HTML - fix column length of each row in each table in the output
body: <p>Background:
  With shell script and Markup HTML on, we are fetching information from multiple databases hosted on different machines.</p>
  <p>Every time, script connects to the database and fetches information(only one row is fetched from each database), it creates a new table and html code is appended to a logfile.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>for SID in $(cat /home/oracle/rmanbackupreport_GG/scripts_GG/dblist);
  do
   echo $SID
  sqlplus -s username/\"PASSWORD\"@${SID} &lt;&lt; EOF
   set feed off term off trims on linesize 300 pages 300 echo off underline off heading off
   set markup html on
   spool ${LOG_DIR}/rman_job_output.log
   set lines 220
   set pages 1000
   col cf for 9,999
   col df for 9,999
   col elapsed_seconds heading "ELAPSED|SECONDS"
   col i0 for 9,999
   col i1 for 9,999
   col l for 9,999
   col output_mbytes for 9,999,999 heading "OUTPUT|MBYTES"
   col status  entmap off
   col time_taken_display for a10 heading "TIME|TAKEN"
   col output_instance for 9999 heading "OUT|INST"
   select a.name,a.open_mode,
     to_char(j.start_time, 'yyyy-mm-dd hh24:mi:ss') start_time,
     to_char(j.end_time, 'yyyy-mm-dd hh24:mi:ss') end_time,
     (j.output_bytes/1024/1024) output_mbytes,
     case
     when  j.status='COMPLETED' then '&lt;font color="green"&gt;'||j.status||'&lt;/font&gt;'
     else '&lt;font color="red"&gt;'||j.status||'&lt;/font&gt;'
     end status,
     j.input_type,
     decode(to_char(j.start_time, 'd'), 1, 'Sunday', 2, 'Monday',
                                        3, 'Tuesday', 4, 'Wednesday',
                                        5, 'Thursday', 6, 'Friday',
                                        7, 'Saturday') dow,
     j.elapsed_seconds, j.time_taken_display
   from V\$RMAN_BACKUP_JOB_DETAILS j,V\$DATABASE a
   where j.start_time &gt; trunc(sysdate)-3 and j.input_type &lt;&gt; 'ARCHIVELOG'
  and j.session_stamp=(select max(session_stamp) from v\$RMAN_BACKUP_JOB_DETAILS j where j.start_time &gt; trunc(sysdate)-7 and j.input_type &lt;&gt; 'ARCHIVELOG')
    /
   spool off
   exit
  EOF
   cat ${LOG_DIR}/rman_job_output.log |grep -v 'SQL&gt;'|grep -v 'SQL&amp;gt'  &gt;&gt; ${LOG_DIR}/rman_job_status.txt
  rm ${LOG_DIR}/rman_job_output.log
  done
  if [ -e ${LOG_DIR}/RMAN_REPORT.html ]
    then
      `rm   ${LOG_DIR}/RMAN_REPORT.html `
  fi</code></pre>
  </div>
  </div>
  </p>
  <p>Issue:
  When I combine all these tables using a logfile, width of each column is different in every row - which ultimately makes output look ugly.</p>
  <p>Expectation:
  Is there a way that we can fix width of each column so that it looks like a single table.</p>
  <p>Below is the current output --
  <a href="https://i.stack.imgur.com/tytWk.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tytWk.jpg" alt="Current output of the script" /></a></p>