UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 30th, 2006, 07:58 AM
saidip saidip is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 3 saidip User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 27 sec
Reputation Power: 0
Need help to write shell script

I am very new to write shell script. please help me it is very urgent.
I want to generate status log for my system everyday .

I have one master file which contains testcases name and product name .

The data is stored in different directories and i am extrating failuers for each system and storting in one file .

But now i have to generate status.log file in this format,

Host Version SiCat YRS nanocad PSD
Krachel 10 2 3 4 6
limo 9 3 1 3 0
limo 10 1 2 0 1

The accumalted file data.log contains fail testcases name
/users/daily/krachel/10/run
! /users/daily/test1
! /users/daily/test3
! /users/daily/tttt
/user/daily/limo/9/run
! /users/daily/test3
! /users/daily/yyyy
/users/daily/limo/10/run
! /users/daily/rrrr
! /users/daily/uuu



The master file contains data
/users/daily/test1 PSD
/users/daily/rrrr SiCat
/users/daily/tttt PSD

The product name we can hardcod in shell script

please do help me to write this script
But now i have to generate status.log file in this format,

Host Version SiCat YRS nanocad PSD
Krachel 10 2 3 4 6
limo 9 3 1 3 0
limo 10 1 2 0 1

Reply With Quote
  #2  
Old August 30th, 2006, 10:04 AM
SimonJM SimonJM is offline
Contributing User
Dev Shed Novice (500 - 999 posts) Click here for more information
 
Join Date: Mar 2006
Posts: 772 SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 2 Weeks 2 Days 1 h 37 m 46 sec
Reputation Power: 327
You will need to be a bit more forthcoming with information than that I fear.
Where are the systems listed, or how are they identifed?
I think I see where version is coming from (as part of the directory name in lines from the data.log extract you show. I also see the system names you refer to for your example status.log - is that where they are obtained from?
What are, and how do you find what SiCat, YRS, nanocad and PSD are?
How does the data in the master.log file tie up with any of the other data?

Reply With Quote
  #3  
Old August 31st, 2006, 04:16 AM
saidip saidip is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 3 saidip User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 27 sec
Reputation Power: 0
The Master file product.dat contains all Test Name and corresponding Product Name.

The fails are in data.dat and i have to print accumalated failuers as per the productwise .

/users/deaily/Krachel/10 conatins host and version name . Fails contains ! infront of that row .

Please do help me

Reply With Quote
  #4  
Old August 31st, 2006, 04:19 AM
saidip saidip is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 3 saidip User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 27 sec
Reputation Power: 0
The status.log i am generating . You are correct the data is stored in directory form .
I am extracting fails from different directories and storing into one file .

I wrote a shell script . which is for loop , find the run.log and grep the "!" fails and stored status log .

Reply With Quote
  #5  
Old September 1st, 2006, 02:33 AM
SimonJM SimonJM is offline
Contributing User
Dev Shed Novice (500 - 999 posts) Click here for more information
 
Join Date: Mar 2006
Posts: 772 SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level)SimonJM User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 2 Weeks 2 Days 1 h 37 m 46 sec
Reputation Power: 327
Sounds like you are on the right lines. You mention the file run.log - this is a new one, I don't see that mentioned before.

What are you using to 'drive' the loop with your script?
What are you doing within each iteration of the loop?

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Need help to write shell script


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT