array values in a command

:confused:
I am a newbie to scripting so I am probably missing something but when this function runs it just returns blank lines, but if I surround the sed with a print it returns the full commands that can be excuted on the command line

ne_ip_change() {

set -A NE `$CAT /tmp/ne_list`

COUNT3=`$CAT /tmp/ne_list | wc -l`

z=0
while [ $z -lt $COUNT3 ]
do

$SED -n '/ManagedElementId string=\"${NE[$z]}\"/,/ipAddress ip_v4/p' $XML | grep ipAddress | cut -f2 -d'=' | cu
t -f1 -d'/'`

    \(\(z=z\+1\)\)

done
}

I don't understand what you're saying. But this:
$SED -n '/ManagedElementId string=\"${NE[$z]}\"/,/ipAddress ip_v4/p'

looks like an attempt to reference a variable, but it is surrounded by single quotes. The shell will not expand a variable inside single quotes.

Use double quotes around sed
use echo "sed .........." to display the output

Thanks guys,
worked a charm , sometimes you just can't see the wood for the trees