What is the cleanest way to send to STDOUT several different formats of text? Say, you have this legacy web report script, it is using printf to format the printing. This breaks occasionally, ie. not giving the desired format cleanly. Now, format I suppose would be an option, but I kinda think of it more as a way of formatting things for printing, not building an email or just going to STDOUT. Since there are also about 4 or 5 different formats being used within the script redefing format is rather a pain..
I guess Im just looking for suggestions really, how would you do it, if say you were building a new web report that required exacting formats, that would not break due to the input.
tia