The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 02-02-2007
zilla30066 zilla30066 is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 13
A Doozy of a problem for me

I have a report I need to format into a nice looking fixed length for each column of output

The report looks like this

1. First Query Title

First Query syntax (select * from tablea)
column1a ,column2a

ROWDATA.......
ROWDATA.......
ROWDATA ......


2. Second Query Title

Second Query syntax (select * from tableb)
column1b ,column2b

ROWDATA ......................................................,ROWDATA
ROWDATA.......................................................,ROWDATA

3. Third Query Syntax

Second Query syntax (select * from tablec)
column1c ,column2c

ROWDATA.................................,ROWDATA
ROWDATA.................................,ROWDATA

As you can see the column width varies from each query result set.
how can I format this report to find the end of each column yes they are all separated by commas and add only one space in order to compact the report.

The dots in each row represents a space

This one is really tough for me
any help is greatly appreciated.


Thanks