11-19-2008
10,
0
Join Date: Nov 2008
Last Activity: 8 June 2009, 1:24 PM EDT
Posts: 10
Thanks Given: 0
Thanked 0 Times in 0 Posts
need help with script
This is what I got so far:
[#!/bin/ksh]
[# select working directory]
[dir_Name=/u/chry3770]
[cd ${dir_Name}]
[check_status=$(status_3770 chry3770)]
[echo "${check_status}"]
output:
B377004e : Script input: * stts
B377003d : (1)-----------------------------------------------------------------
B377003e : (1) Status for PU:VISCHPU - LU:VISCHLU2
B377003f : (1) Session States SSCP-LU: CONTENTION LU-LU: CONTENTION
B3770040 : (1) RUs sent = 0
B3770041 : (1) RUs received = 1
B3770042 : (1) ANY Output File = chry3770.fil.1
B377003d : (1)-----------------------------------------------------------------
B377003d : (2)-----------------------------------------------------------------
B377003e : (2) Status for PU:VISCHPU - LU:VISCHLU1
B377003f : (2) Session States SSCP-LU: CONTENTION LU-LU: CONTENTION
B3770040 : (2) RUs sent = 0
B3770041 : (2) RUs received = 0
B3770042 : (2) ANY Output File = chry3770.fil.2
B377003d : (2)-----------------------------------------------------------------
now I need to send an email to my self if the lines are down. I'm new at this thanks for help in advance.
the output when lines are down is:
B377004e : Script input: * stts
B377003d : (1)-----------------------------------------------------------------
B377003e : (1) Status for PU:VISCHPU - LU:VISCHLU2
B377003f : (1) Session States SSCP-LU: INACTION LU-LU: INACTION
B3770040 : (1) RUs sent = 0
B3770041 : (1) RUs received = 1
B3770042 : (1) ANY Output File = chry3770.fil.1
B377003d : (1)-----------------------------------------------------------------
B377003d : (2)-----------------------------------------------------------------
B377003e : (2) Status for PU:VISCHPU - LU:VISCHLU1
B377003f : (2) Session States SSCP-LU: INACTION LU-LU: INACTION
B3770040 : (2) RUs sent = 0
B3770041 : (2) RUs received = 0
B3770042 : (2) ANY Output File = chry3770.fil.2
B377003d : (2)-----------------------------------------------------------------
i know im suppose to use if statements but dont exactly know where to start. Thanks again in advance...
Last edited by jim mcnamara; 11-19-2008 at 01:53 PM..
Reason: duplicate post