Hi All... I've searched and found nothing.... this script runs just fine on
AIX, Solaris, and Linux, but under cygwin, the array VALUE prints only
blanks.. has anyone else run into this... I've tried a bunch of different
things around typecast, etc, but it looks like VALUE is local in the table_it
function... any thoughts???
table_it()
{
case "$1" in
class) VALUE[0]=$2 ;;
source) VALUE[1]=$2 ;;
server) VALUE[2]=$2 ;;
sub_source) VALUE[3]=$2 ;;
msg_catalog) VALUE[4]=$2 ;;
epage) VALUE[5]=$2 ;;
threshold) VALUE[6]=$2 ;;
*) echo "UNKNOWN $1 $2" ;;
esac
}
TEMP1=/tmp/parse_log4j_01
find $1 -type f -print | while read filename rest
do
echo "$filename"
grep "Tec_" $filename | dd conv=lcase 2>/dev/null | sed -e 's/<param
name="//
' -e 's/\/>//' -e 's/"//g' -e 's/value=//' -e 's/tec_slotpair//' -e 's/tec_//' -
e 's/,/\n/g' -e 's/:/ /g' | while read flip flop
do
table_it $flip $flop
done
grep "tec_" $filename | dd conv=lcase 2>/dev/null | sed -e 's/<param
name="//
' -e 's/\/>//' -e 's/"//g' -e 's/value=//' -e 's/tec_slotpair//' -e 's/tec_//' -
e 's/,/\n/g' -e 's/:/ /g' | while read flip flop
do
table_it $flip $flop
done
echo "0 ${VALUE[0]}"
echo "1 ${VALUE[1]}"
echo "2 ${VALUE[2]}"
echo "3 ${VALUE[3]}"
echo "4 ${VALUE[4]}"
echo "5 ${VALUE[5]}"
echo "6 ${VALUE[6]}"
done
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/