My script, part of creating html tables in email using awk, printing additional commas (,)
`if (m_premium > mp) {printf ("%s,%.2f,%s\n","<td bgcolor=pink>",m_premium,"TiB</td>");}`
Output is
<td bgcolor=pink>,60.03,TiB</td>
There two extra commas; ie the output should be <td bgcolor=pink>60.03 TiB</td>
Thanks in advance
>Solution :
The commas you see are those from your format string.
"%s,%.2f,%s\n"
If they bother you, remove them.
Everything in a printf format string which is not part of a conversion specifier or the two-character sequence %% is a character that is printed verbatim; the commas you wrote have no special meaning.