Sponsored Content
Top Forums Shell Programming and Scripting Displaying log file pattern output in tabular form output Post 302763697 by Optimus81 on Wednesday 30th of January 2013 10:45:20 AM
Old 01-30-2013
Thanks for the reply. nawk works but there is some issue with passed/failed/no result count.


In the below output, if you see there is 3 Passed, 5 Failed and 1 No result (number 9) but not sure why it showing wrong information.
Code:
root@OPT # ./output.sh
|========================================|
|        Consolidated Report Status      |
|========================================|
|   SI No     CHECKS           STATUS    |
|========================================|
|------------------------------------------|
| 1). Interface Checking  : Passed   |
|------------------------------------------|
|------------------------------------------|
| 2). OS version Checking  : Passed   |
|------------------------------------------|
|------------------------------------------|
| 3). Comp running check  : Failed   |
|------------------------------------------|
|------------------------------------------|
| 4). Verify Server Connection, for ADD/ZDZ/IDD components  :           Failed   |
|------------------------------------------|
|------------------------------------------|
| 5). Verify Service Availability, for PZPZS or ADD/ZDZ or IDD/DDM or ALRZX  : Failed   |
|------------------------------------------|
|------------------------------------------|
| 6). Verify Resiliency  : Failed   |
|------------------------------------------|
|------------------------------------------|
| 7). Verify mon component  : Passed   |
|------------------------------------------|
|------------------------------------------|
| 8). Checking the Core file  :  Failed   |
|------------------------------------------|
|------------------------------------------|
| 9). Data request checking and Usage collection checking  : Please execute /tmp/TestPerm.bash script   |
|------------------------------------------|
|========================================|
| Total e[1;32;40m Passed: 3         |
| Total e[1;31;40m Failed: 3           |
| Total No Result:          |
| Total Executed: 9                      |
|========================================|

Many Thanks for the color code link, i tried that too but again it doesn't evalutes the value instead it just prints. am using printf but both below line didn't work

Code:
printf "| Total \e[1;32;40m Passed:\ " p "\        |\n"
print  "| Total \e[1;31;40m Failed: " f "           |"

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to parse through a file and based on condition form another output file

I have one file say CM.txt which contains values like below.Its just a flat file 1000,A,X 1001,B,Y 1002,B,Z ... .. total around 4 million lines of entries will be in that file. Now i need to write another file CM1.txt which should have 1000,1 1001,2 1002,3 .... ... .. Here i... (6 Replies)
Discussion started by: sivasu.india
6 Replies

2. 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

3. 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

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

script to mail monitoring output if required or redirect output to log file

Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions. ... (4 Replies)
Discussion started by: aix_admin_007
4 Replies

8. 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

9. Shell Programming and Scripting

Dispaying output in tabular form

hi, I have a script which is dispaying the output as below: Column 3:value1 Column 4:value 4 column 8:value 8 column 9:value 9 column 13:value 13 Column 3:value10 Column 4:value 40 column 8:value 80 column 9:value 90 column 13:value 103 However,I need the output in tabular... (5 Replies)
Discussion started by: Vivekit82
5 Replies

10. Shell Programming and Scripting

Script to generate Excel file or to SQL output data to Excel format/tabular format

Hi , i am generating some data by firing sql query with connecting to the database by my solaris box. The below one should be the header line of my excel ,here its coming in separate row. TO_CHAR(C. CURR_EMP_NO ---------- --------------- LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies
PERLHURD(1)						 Perl Programmers Reference Guide					       PERLHURD(1)

NAME
README.hurd - Perl version 5 on Hurd DESCRIPTION
If you want to use Perl on the Hurd, I recommend using the Debian GNU/Hurd distribution ( see http://www.debian.org/ ), even if an official, stable release has not yet been made. The old "gnu-0.2" binary distribution will most certainly have additional problems. Known Problems with Perl on Hurd The Perl test suite may still report some errors on the Hurd. The "lib/anydbm" and "pragma/warnings" tests will almost certainly fail. Both failures are not really specific to the Hurd, as indicated by the test suite output. The socket tests may fail if the network is not configured. You have to make "/hurd/pfinet" the translator for "/servers/socket/2", giving it the right arguments. Try "/hurd/pfinet --help" for more information. Here are the statistics for Perl 5.005_62 on my system: Failed Test Status Wstat Total Fail Failed List of failed ------------------------------------------------------------------------- lib/anydbm.t 12 1 8.33% 12 pragma/warnings 333 1 0.30% 215 8 tests and 24 subtests skipped. Failed 2/229 test scripts, 99.13% okay. 2/10850 subtests failed, 99.98% okay. There are quite a few systems out there that do worse! However, since I am running a very recent Hurd snapshot, in which a lot of bugs that were exposed by the Perl test suite have been fixed, you may encounter more failures. Likely candidates are: "op/stat", "lib/io_pipe", "lib/io_sock", "lib/io_udp" and "lib/time". In any way, if you're seeing failures beyond those mentioned in this document, please consider upgrading to the latest Hurd before reporting the failure as a bug. AUTHOR
Mark Kettenis <kettenis@gnu.org> Last Updated: Fri, 29 Oct 1999 22:50:30 +0200 perl v5.14.2 2011-09-26 PERLHURD(1)
All times are GMT -4. The time now is 09:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy