Sponsored Content
Top Forums Shell Programming and Scripting Dispaying output in tabular form Post 302852937 by Vivekit82 on Thursday 12th of September 2013 04:54:23 PM
Old 09-12-2013
input file as below which is , separated.

Code:
 
column1,column2,column3,column4,column5,column6,column7
value1,value2,value3,value4,value5,value6,value7
value11,value21,value31,value41,value51,value61,value71

I am using the below command do get the output

Code:
 
IFILE=/home/home1/Report1
OFILE=/home/home1/`date +"%m%d%y%H%M%S"`.dat
if [ -r $IFILE ]  #Checks if file exists and readable
then
awk -F , 'int($6)!="0"||int($7)!="0" {printf "Colum1:                        %s\ncolumn2:                                 %s\ncolumn3:             %s\nFile column4:                                 %s\ncolumn5:              %s\ncolumn6 :       %s\nColumn7:    %s\n",$1,$2,$3,$4,$5,$6,$7}' $IFILE
fi

The above is giving output as below:
Code:
 
column1:value1
column2:value2

and so on

Code:
 
I need the output in tabular form
column1  column2  column3  column4  column5  column6  column7
value1      value2     value3    value4   value5   value6   value7
value11   value21     value31    value41   value51   value61   value71

I belive using HTML tags we cam do but not sure how can we use in my script.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Displaying the output in the tabular Format

Hi, I have a file which contains the data in the below format and need to develop a script which will give the output in the tabular format. Could you please advice me. Folder: Workflow: version . Workflow run status: Workflow run error code: Schedule time: Workflow run type: ... (2 Replies)
Discussion started by: kandi.reddy
2 Replies

2. Shell Programming and Scripting

generate tabular output from an input text file in unix shell scripting

Hi, I have the output (as below) which i want it to be in a table. For e.g. space utilization in PSE on path /logs is 0% space utilization in PSE on path /logs/tuxedo/tuxlsp is 16% space utilization in PSE on path /ldvarlsp/lsp/log is 37% space utilization in PSE on path /home is 6%... (7 Replies)
Discussion started by: pkbond
7 Replies

3. Shell Programming and Scripting

Tabular form in shell script

hi, I need to mention the data in tabular form in shell script. :confused: Input as below: Health check (heading1) CPU/Memory Utilization of pc on server (h2) 1214 of rpc3 is exceeds 0.3 % (data) CPU Utilization is normal for rpc/33 on 2673 CPU Utilization is normal for rpc/33 on... (2 Replies)
Discussion started by: sreelu
2 Replies

4. UNIX for Dummies Questions & Answers

Put data into tabular form

Hi I am having a file which is required to be presented in the under-noted output form. Please suggest. Input: Kapil: apple 4 banana 6 cherry 0 Manoj: apple 13 banana cheery 2 Output: apple banana cherry Kapil: 4 6 0 Manoj: 13 2 Thanks in... (4 Replies)
Discussion started by: vanand420
4 Replies

5. UNIX for Dummies Questions & Answers

Put data in tabular form..

Dear Friends, I have a file as under : +++ ME 12-06-13 18:16:20 A RED FEW AND ROW1 1MN FEL AS HI FI BV LR TS HR ES MR * 0 13296 0 120 1 15 KS RR 10 0 +++ ME 12-06-13 18:26:20 A RED FEW AND ROW2 1MN FEL AS... (2 Replies)
Discussion started by: vanand420
2 Replies

6. Shell Programming and Scripting

Displaying output in the tabular format

Hi I want to display the following input data into the tabular format as shown in the output. Input.txt: Following jobs are in pending state for more than 10 minutes: JOB_ID JOB_SUBMIT_ID MAHAR 784308 PUNJA 109367 Following jobs are running for longer time: JOB_ID... (1 Reply)
Discussion started by: dats
1 Replies

7. Shell Programming and Scripting

Mail attachment dispaying in different format.

Hi friends, I have file1.txt where i am sending this file as attatment in mail using below code uuencode file1.txt file1.txt | mail -s 'TestFile' test@test.com but the format of the file is changing when i open in attachement. file1.txt in unix 1|hyd|nag 2|jun|kin ... (4 Replies)
Discussion started by: i150371485
4 Replies

8. Shell Programming and Scripting

Displaying log file pattern output in tabular form output

Hi All, I have result log file which looks like this (below): from the content need to consolidate the result and put it in tabular form 1). Intercomponents Checking Passed: All Server are passed. ====================================================================== 2). OS version Checking... (9 Replies)
Discussion started by: Optimus81
9 Replies

9. Shell Programming and Scripting

Grep command output in tabular format

I have a grep command script which works fine and give the correct results but i wanted the output to be displayed in tabular format ? Is it possible to display the output in tabular format and as well direct them to some file. main script : #!/usr/bin/bash Start_Time=`date '+%m%d%y... (1 Reply)
Discussion started by: Optimus81
1 Replies

10. Shell Programming and Scripting

Fetching the required data out of a tabular form

Hello Gurus, I am trying to fetch a required number of lines from an output of a command which is in tabular form. Below is the command for reference along with how the result is being shown on UNIX shell. /usr/openv/volmgr/bin/vmquery -b -p 5 The result of the above command is as... (6 Replies)
Discussion started by: Ali Sarwar
6 Replies
Alzabo::Runtime::Column(3pm)				User Contributed Perl Documentation			      Alzabo::Runtime::Column(3pm)

NAME
Alzabo::Runtime::Column - Column objects SYNOPSIS
use Alzabo::Runtime::Column; DESCRIPTION
This object represents a column. It holds data specific to a column. INHERITS FROM
"Alzabo::Column" Note: all relevant documentation from the superclass has been merged into this document. METHODS
table Returns the table object to which this column belongs. name Returns the column's name as a string. nullable Returns a boolean value indicating whether or not NULLs are allowed in this column. attributes A column's attributes are strings describing the column (for example, valid attributes in MySQL are 'UNSIGNED' or 'ZEROFILL'. This method returns a list of strings of such strings. has_attribute This method can be used to test whether or not a column has a particular attribute. By default, the check is case-insensitive. It takes the following parameters: * attribute => $attribute * case_sensitive => 0 or 1 (defaults to 0) It returns a boolean value indicating whether or not the column has this particular attribute. type Returns the column's type as a string. sequenced The meaning of a sequenced column varies from one RDBMS to another. In those with sequences, it means that a sequence is created and that values for this column will be drawn from it for inserts into this table. In databases without sequences, the nearest analog for a sequence is used (in MySQL the column is given the AUTO_INCREMENT attribute, in Sybase the identity attribute). In general, this only has meaning for the primary key column of a table with a single column primary key. Setting the column as sequenced means its value never has to be provided to when calling "Alzabo::Runtime::Table->insert". Returns a boolean value indicating whether or not this column is sequenced. default Returns the default value of the column as a string, or undef if there is no default. default_is_raw Returns true if the default is intended to be provided to the DBMS as-is, without quoting, fore example "NOW()" or "current_timestamp". length Returns the length attribute of the column, or undef if there is none. precision Returns the precision attribute of the column, or undef if there is none. is_primary_key Returns a boolean value indicating whether or not this column is part of its table's primary key. is_numeric Returns a boolean value indicating whether the column is a numeric type column. is_integer Returns a boolean value indicating whether the column is a numeric type column. is_floating_point Returns a boolean value indicating whether the column is a numeric type column. is_character Returns a boolean value indicating whether the column is a character type column. This is true only for any columns which are defined to hold text data, regardless of size. is_date Returns a boolean value indicating whether the column is a date type column. is_datetime Returns a boolean value indicating whether the column is a datetime type column. is_time Returns a boolean value indicating whether the column is a time type column. is_time_interval Returns a boolean value indicating whether the column is a time interval type column. is_blob Returns a boolean value indicating whether the column is a blob column. This is true for any columns defined to hold binary data, regardless of size. generic_type This methods returns one of the following strings: integer floating_point character date datetime time blob unknown definition The definition object is very rarely of interest. Use the "type()" method if you are only interested in the column's type. This methods returns the "Alzabo::Runtime::ColumnDefinition" object which holds this column's type information. comment Returns the comment associated with the column object, if any. alias Takes the following parameters: * as => $name This method returns an object that can be used in calls to the table and schema "select()" methods in order to change the name given to the column if "next_as_hash()" is called on the "Alzabo::DriverStatement" returned by the aforementioned "select()" method. AUTHOR
Dave Rolsky, <autarch@urth.org> perl v5.8.8 2007-12-23 Alzabo::Runtime::Column(3pm)
All times are GMT -4. The time now is 08:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy