Sponsored Content
Top Forums Shell Programming and Scripting Parsing a log file and creating a report script Post 303002022 by amir07 on Wednesday 16th of August 2017 10:31:06 AM
Old 08-16-2017
The reason tmscsi ignored because there is no manufacturer name, serial number and part number.
ssa1 also need to be reported.
all devices with manufacturer name, seriall number and part number need to be reported!

---------- Post updated at 09:30 AM ---------- Previous update was at 09:11 AM ----------

Code:
for h in nb11cu51
do
ssh root@$h lsattr -Elsys0 | awk -v h=$h '
echo { print "Device  Manufacturer   Machine_Type Model     FRU_Number     Serial_Number     Part_Number" }
$1=="Manufacturer   "{s=$2}
$1=="Manufacturer"{m=$2}
$1=="Model"{n=$2}
$1=="Fru_Number"{o=$2}
$1=="Serial_number"{p=$2}
$1=="Part_Number"{q=$2}
END {print h,m,s,n,o,q}'
done

I could not figure out the heading detail of the report and counts.

---------- Post updated at 09:31 AM ---------- Previous update was at 09:30 AM ----------

Code:
for h in nb11cu51
do
ssh root@$h lsattr -Elsys0 | awk -v h=$h '
echo { print "Device  Manufacturer   Machine_Type Model     FRU_Number     Serial_Number     Part_Number" }
$1=="Manufacturer   "{s=$2}
$1=="Manufacturer"{m=$2}
$1=="Model"{n=$2}
$1=="Fru_Number"{o=$2}
$1=="Serial_number"{p=$2}
$1=="Part_Number"{q=$2}
END {print h,m,s,n,o,q}'
done

I could not figure out the heading detail of the report and counts.


Moderator's Comments:
Mod Comment Thanks for trying, but youve been TOO generous with the ICODE tags.
Please use CODE tags as required by forum rules!

Last edited by RudiC; 08-16-2017 at 12:01 PM.. Reason: Changed copious amounts of ICODE to single CODE tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with a shell script for creating a log file

I have a schell script that runs continously on an AIX system. It is actually started from another shell script with the "ksh -x" command and then I just write the output to a log file. This causes the log files to be filled with mostly useless information. I would like to modify this script to... (2 Replies)
Discussion started by: heprox
2 Replies

2. Shell Programming and Scripting

Shell script for parsing 300mb log file..

am relatively new to Shell scripting. I have written a script for parsing a big file. The logic is: Apart from lot of other useless stuffs, there are many occurances of <abc> and corresponding </abc> tags. (All of them are properly closed) My requirement is to find a particular tag (say... (3 Replies)
Discussion started by: gurpreet470
3 Replies

3. Shell Programming and Scripting

Help with script parsing a log file

I have a large log file, which I want to first use grep to get the specific lines then send it to awk to print out the specific column and if the result is zero, don't do anything. What I have so far is: LOGDIR=/usr/local/oracle/Transcription/log ERRDIR=/home/edixftp/errors #I want to be... (3 Replies)
Discussion started by: mevasquez
3 Replies

4. UNIX for Dummies Questions & Answers

Script for parsing details in a log file to a seperate file

Hi Experts, Im a new bee for scripting, I would ned to do the following via linux shell scripting, I have an application which throws a log file, on each action of a particular work with the application, as sson as the action is done, the log file would vanish or stops updating there, the... (2 Replies)
Discussion started by: pingnagan
2 Replies

5. Shell Programming and Scripting

Parsing of file for Report Generation (String parsing and splitting)

Hey guys, I have this file generated by me... i want to create some HTML output from it. The problem is that i am really confused about how do I go about reading the file. The file is in the following format: TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies

6. UNIX for Dummies Questions & Answers

Creating a report from csv file.

Hi Gurus, I need your help in transforming the CSV file into some what a report format. My source file looks like below Date,ProdID,TimeID,LevelID 2010-08-31,200,M,1 2010-08-31,201,Q,2 2010-08-31,202,Y,1 2010-08-31,203,M,5 Output required is ... (9 Replies)
Discussion started by: naveen.kuppili
9 Replies

7. Shell Programming and Scripting

Script for Parsing Log File

Working on a script that inputs an IP, parses and outputs to another file. A Sample of the log is as follows: I need the script to be able to input IP and print the data in an output file in the following format or something similar: Thanks for any help you can give me! (8 Replies)
Discussion started by: Winsarc
8 Replies

8. Shell Programming and Scripting

Parsing with Name value pair and creating a normalized file

I have url string as follows and I need to parse the name value pair into fields /rows event_id date time payload 1329130951 20120214 22.30.40... (1 Reply)
Discussion started by: smee
1 Replies

9. Shell Programming and Scripting

Shell script for creating log file and sending mail?

Hi , I am trying to create shell script which will help me to compare file name in two folder. There is a multiple file store in 2 folder.I want to compare that with the name. If all the file are same then send a mail that "all date is same" if not then create one log file which contain... (4 Replies)
Discussion started by: san_dy123
4 Replies

10. Shell Programming and Scripting

Issue with awk script parsing log file

Hello All, I am trying to parse a log file and i got this code from one of the good forum colleagues, However i realised later there is a problem with this awk script, being naive to awk world wanted to see if you guys can help me out. AWK script: awk '$1 ~ "^WRITER_" {p=1;next}... (18 Replies)
Discussion started by: Ariean
18 Replies
ADDRDSINS(3)						      RDS PHYSICAL FUNCTIONS						      ADDRDSINS(3)

NAME
addrdsins - adds an instance to a figure ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in Paris, France. Web : http://asim.lip6.fr/recherche/alliance/ E-mail : alliance-users@asim.lip6.fr SYNOPSYS
#include "rdsnnn.h" rdsins_list *addrdsins( Figure, Model, Name, Sym, X, Y ) rdsfig_list *Figure; char *Model; char *Name; char Sym; long X; long Y; PARAMETER
Figure figure which contains the instance. Model Name of the model of the instance. Name Name of the instance in the figure at which it belongs. Sym Symmetry applied to the instance. possible values : RDS_NOSYM no symmetry. RDS_ROT_P 90 degrees rotation counter clockwise. RDS_SYMXY symmetry with regard to a horizontal and vertical axis. RDS_ROT_M 90 degrees rotation clockwise. RDS_SYM_X symmetry with regard to a vertical axis. RDS_SY_RM symmetry with regard to a vertical axis and 90 degrees clockwise. RDS_SYM_Y symmetry with regard to a horizontal axis. RDS_SY_RP symmetry with regard to a horizontal axis and 90 degrees rotation counter clockwise. X,Y position of the lower left corner of the instance in the figure after symmetry. DESCRIPTION
The addrdsins function adds an instance to the head of instances's list in the figure described in function parameter. Some fields of rdsins_list structure are modified as follows : The field FIGNAME is set to Model The field INSNAME is set to Name The field X is set to X The field Y is set to Y The field TRANSF is set to Sym The field SIZE is set to Figure->SIZE RETURN VALUE
addrdsins returns a pointer to the newly created instance which is head of instances's list of the figure. ERRORS
"Rds202: rdsalloc error, can't continue !" it's impossible to allocate the memory size desired. EXAMPLE
#include "mutnnn.h" #include "rdsnnn.h" #include "rtlnnn.h" typedef struct UserStruct { char *STRING; void *USER1; } UserStruct; main() { rdsfig_list *RdsFigure; rdsins_list *Instance; mbkenv(); rdsenv(); loadrdsparam(); RdsFigure = addrdsfig ("core",sizeof ( UserStruct ) ); Instance = addrdsins (RdsFigure,"na2_y","and2",RDS_NOSYM,8,6); printf("(RdsFigure->INSTANCE)->NAME = %s ", (RdsFigure->INSTANCE)->NAME); /* Instance is head of instance list of the figure */ printf("Instance->NAME = %s ", Instance->NAME); } SEE ALSO
librds, delrdsins, viewrdsins BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools. ASIM
/LIP6 October 1, 1997 ADDRDSINS(3)
All times are GMT -4. The time now is 02:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy