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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old September 19th, 2003, 10:53 AM
josephg josephg is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: sydney
Posts: 47 josephg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 56 m
Reputation Power: 5
script to getline and if condition

Hi
I am new with shell script programming could some one please help.
How can I get the hostname with his infoline-1 to infoline-n if the total error for the hostname is >0 and then the next hostname-n and infoline-n (Skip the xxxx data and read and print the hostname No of errors and his information

Data file is:
Xxxxxxxxxx
Xxxxxxxxx
Hostname1
Infoline-1
Error=1
Infoline-n
Error=0
xxxxx
Total Error for hostname1 =1
Xxxxxxxxxxx
Xxxxxxxxxxx
Xxxxxxxxxx
Hostname2
Infoline-1
Error=0
Infoline-n
Error=0
Xxxxxxx
Total Error for hostname2 =0
Xxxxxxx
Hostname 3
Infoline-1
error=3
infoline-n
error=1
Total Error for hostname3 =4

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > script to getline and if condition


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 1 hosted by Hostway