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
Output formating jaydeep_sadaria Shell Programming and Scripting 1 04-10-2008 09:39 AM
formating array file output using perl seismic_willy Shell Programming and Scripting 4 03-21-2007 10:23 PM
formating output Krrishv Shell Programming and Scripting 20 02-02-2007 05:39 AM
Formating cal output Krrishv Shell Programming and Scripting 2 01-11-2007 06:46 AM
displaying output in a table. sanchopansa Shell Programming and Scripting 6 10-06-2006 09:22 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-12-2008
Registered User
 

Join Date: May 2008
Posts: 1
Problem In Formating Table as Output

Hi!
I'm working a program that collects 4 various inputs and format my output into tabular form.Problem is my table margins move with different character lengths.
Is there a way to fix my table margins even though the variables inside the table varies in length?

thank you very much...
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-12-2008
Registered User
 

Join Date: Jul 2006
Posts: 189
Code:
echo $* | awk '{ printf "%10s %20s %5d\n", $1, $2, $3)'
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 03:53 PM.


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

Content Relevant URLs by vBSEO 3.2.0