delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=0.8 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_45 |
X-Spam-Check-By: | sourceware.org |
From: | Hubert Samm <iamsamm AT sammiam DOT us> |
To: | cygwin AT cygwin DOT com |
Subject: | problem under cygwin with sh, bash, ksh |
Date: | Fri, 6 Mar 2009 07:26:35 -0600 |
User-Agent: | KMail/1.9.10 |
MIME-Version: | 1.0 |
Message-Id: | <200903060726.35848.iamsamm@sammiam.us> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |