Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to accomplish this? Anyone Post 302185997 by xossarian on Wednesday 16th of April 2008 08:42:25 AM
Old 04-16-2008
How to accomplish this? Anyone

Hi All

I am new to Linux and Shell scripting. So bear with me.

I have two file the log.txt and the output.txt.
The log.txt looks like this
-------------------------------------------------------------------------
####
- r34327 | #####| 2008-03-31 10:18:35 -0400 (Mon, 31 Mar 2008) | 1 line Tag created for 00.04.11.04
- r34077 | #####| 2008-03-27 17:38:58 -0400 (Thu, 27 Mar 2008) | 3 lines Pilot CSC Inbound error fixed TeamTrack ID: D11237

#####
- r34327 | #######| 2008-03-31 10:18:35 -0400 (Mon, 31 Mar 2008) | 1 line 00.04.11.04
- r34193 | #######| 2008-03-28 10:29:17 -0400 (Fri, 28 Mar 2008) | 3 lines D09285 - Code change for Edit filtering TeamTrack ID:12345
-------------------------------------------------------------------------
The output.txt file looks like this. It contains the desscription of the ID's in log.txt. But the output file only contains the number not the whole TeamTrack ID
-------------------------------------------------------------------------
Defect/LifeCycle Mgmt/11237:CSC : Pilot: CrossSystemInbound Error
Fixed Release No: 11.02
search with some specific customers who are in 442 and another with 7932.
- 1 occured 2 days ago
- 2 occured yesterday
-------------------------------------------------------------------------
What i want to accomplish is write a script that searches for all the ID's in log.txt file and then retreives the information about the particular TeamTrack ID from the output.txt file and only get the first 3 lines and write it back in the log.txt next to the TeamTrack ID
E.g.
-------------------------------------------------------------------------
####
- r34327 | #####| 2008-03-31 10:18:35 -0400 (Mon, 31 Mar 2008) | 1 line Tag created for 00.04.11.04
- r34077 | #####| 2008-03-27 17:38:58 -0400 (Thu, 27 Mar 2008) | 3 lines Pilot CSC Inbound error fixed TeamTrack ID: 11237
Defect/LifeCycle Mgmt/11237:CSC : Pilot: CrossSystemInbound Error
Fixed Release No: 11.02
-------------------------------------------------------------------------
And do it for all the ID in the log.txt

can somebody point me to the right direction
Thank you
X
 

2 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Any ideas how to accomplish this storage move?

We have a datacenter in another part of the country with about a 100Mb WAN between that datacenter and the local datacenter. The remoted datacenter has about 20TB of data on roughly 75 servers that all must be moved to this datacenter with minimal downtime. Please help me come up with the best way... (2 Replies)
Discussion started by: keelba
2 Replies

2. Red Hat

How to accomplish this?

Guys, I'm here again with more questions. I have been asked to perform the following in a few servers: Check: OS system messages review Non-intrusive tests of the hardware SAN and network(ports,bandwidth and firewall/load balancer checks Any input how to accomplish all this? ... (0 Replies)
Discussion started by: 300zxmuro
0 Replies
PMDANAMED(1)						       Performance Co-Pilot						      PMDANAMED(1)

NAME
pmdanamed - BIND (named) PMDA DESCRIPTION
pmdanamed is a Performance Metrics Domain Agent (PMDA) which exports metric values from the BIND DNS server. Further details on BIND can be found at http://isc.org/. INSTALLATION
If you want access to the names and values for the named performance metrics, do the following as root: # cd $PCP_PMDAS_DIR/named # ./Install If you want to undo the installation, do the following as root: # cd $PCP_PMDAS_DIR/named # ./Remove pmdanamed is launched by pmcd(1) and should never be executed directly. The Install and Remove scripts notify pmcd(1) when the agent is installed or removed. FILES
/var/named/data/named_stats.txt statistics file showing values exported from named /var/named/chroot/var/named/data/named_stats.txt chroot variant of statistics file showing values exported from named $PCP_PMDAS_DIR/named/Install installation script for the pmdanamed agent $PCP_PMDAS_DIR/named/Remove undo installation script for the pmdanamed agent $PCP_LOG_DIR/pmcd/named.log default log file for error messages from pmdanamed SEE ALSO
pmcd(1), named.conf(5), named(8). 3.8.10 Performance Co-Pilot PMDANAMED(1)
All times are GMT -4. The time now is 06:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy