The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 11:43 AM
Formatting using awk cdunavent Shell Programming and Scripting 2 03-18-2003 02:09 PM
formatting tamemi UNIX for Dummies Questions & Answers 5 07-21-2002 09:03 AM
formatting xeron UNIX for Dummies Questions & Answers 5 03-20-2002 11:33 AM
formatting darryll777 UNIX for Dummies Questions & Answers 1 03-04-2002 01:15 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-06-2008
mirusnet's Avatar
mirusnet mirusnet is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 146
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
  #2 (permalink)  
Old 01-06-2008
frank_rizzo frank_rizzo is offline Forum Advisor  
Resident BOFH
  
 

Join Date: Dec 2007
Posts: 425
use printf
  #3 (permalink)  
Old 01-06-2008
mirusnet's Avatar
mirusnet mirusnet is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 146
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.
  #4 (permalink)  
Old 01-06-2008
frank_rizzo frank_rizzo is offline Forum Advisor  
Resident BOFH
  
 

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

check the man page.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:31 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0