The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Formatting Output dhanamurthy Shell Programming and Scripting 6 05-02-2008 08:43 AM
Formatting using awk cdunavent Shell Programming and Scripting 2 03-18-2003 11:09 AM
formatting tamemi UNIX for Dummies Questions & Answers 5 07-21-2002 06:03 AM
formatting xeron UNIX for Dummies Questions & Answers 5 03-20-2002 08:33 AM
formatting darryll777 UNIX for Dummies Questions & Answers 1 03-04-2002 10:15 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-06-2008
mirusnet's Avatar
Registered User
 

Join Date: Dec 2007
Posts: 139
Formatting

I have next part of script:
Code:
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

03:16:06 Converting Table OK
03:16:07 Converting TableLong OK
03:16:08 Converting TableLargest OK
Reply With Quote
Forum Sponsor
  #2  
Old 01-06-2008
Resident BOFH
 

Join Date: Dec 2007
Posts: 262
use printf
Reply With Quote
  #3  
Old 01-06-2008
mirusnet's Avatar
Registered User
 

Join Date: Dec 2007
Posts: 139
Quote:
Originally Posted by frank_rizzo View Post
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.
Reply With Quote
  #4  
Old 01-06-2008
Resident BOFH
 

Join Date: Dec 2007
Posts: 262
as long as you use the proper format specifiers it will work.

check the man page.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 07:28 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0