The problem is the pipe. It starts a subprocess, which is invisible to the parent process, i.e. the outer loop. This fragment will work:
echo ===========Loop 1==============
declare -a RULES
i=0
j=4
INFILE="/tmp/junkfile"
RULES=(`cat $INFILE`)
echo RULES ARRAY ${RULES[*]}
It's always nice to see compact shell scripts!
jch
-- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list