Search Results

Search: Posts Made By: rcc50886
2,215
Posted By delugeag
cat $ORATAB | grep ^+ASM | wc -l please...
cat $ORATAB | grep ^+ASM | wc -l

please replace that by:
grep -c '^+ASM' $ORATAB
6,536
Posted By agama
Then this: awk -F = ' /^NAME/ { n =...
Then this:


awk -F = '
/^NAME/ { n = $2; next }
/^TARGET/ { t = $2; next; }
/^STATE/ {
if( t != $2 && !(t == "OFFLINE" && $2 == "ONLINE") )
print n;
}
'...
1,837
Posted By vidyadhar85
try using grep $x$ if you are expecting GATE at...
try using grep $x$ if you are expecting GATE at the end of line..
1,705
Posted By tukuyomi
A bit straightforward, but it should do the...
A bit straightforward, but it should do the trick, at least on the sample you provided:
~/unix.com$ awk -F'=' '/NAME/{n=$2}/TARGET/{t=$2}/STATE/{s=$2}{if(s&&t&&(s!=t)){s="";t="";print n}}' file...
Showing results 1 to 4 of 4

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