Formatting

I have next part of script:

for i in $LIST
        do
                echo "`date +"%H:%M:%S"` Converting $i ...";
                mysql -uroot some -sABe "ALTER TABLE $i ENGINE=$ENGINE";
        done

I want to get following output formatting:
"OK" must be one under another :slight_smile:

03:16:06 Converting Table OK
03:16:07 Converting TableLong OK
03:16:08 Converting TableLargest OK

use printf

As I understand, if I will use printf
then whole string will appear in the same moment before or after needed command.
I need "OK" after previous command will be finished.

as long as you use the proper format specifiers it will work.

check the man page.