Search Results

Search: Posts Made By: rdrtx1
1,294
Posted By rdrtx1
Can you post a sample input file for the second? ...
Can you post a sample input file for the second?

Updated sample runs with updated second script:
cat << NODES > db_status.txt
Name | Status
------------------
DB 1 | UP
DB 2 | UP
DB...
1,294
Posted By rdrtx1
awk -F"|" ' NR > 2 { if ($2 !~ /UP/) { ...
awk -F"|" '
NR > 2 {
if ($2 !~ /UP/) {
print "Node: " $1 "is" $2 ;
all_nodes_ok=1;
}
}
END {
if (! all_nodes_ok) print "All Nodes OK" ;
}' db_status.txt
1,294
Posted By rdrtx1
awk '/DOWN *$/ && $(NF-1)="is"' table.txt ...
awk '/DOWN *$/ && $(NF-1)="is"' table.txt

Caveat on using /DOWN/ for line match, it returns lines like:
DOWNEY | UP
SHOWDOWN | UP
1,294
Posted By rdrtx1
DB 3 is down.
DB 3 is down.
Showing results 1 to 4 of 4

 

Featured Tech Videos

All times are GMT -4. The time now is 07:57 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy