Hello all,
Need some help here ..
country=(argentina brazil china)
for (( i=0; i < ${#country}; i++ )); do
for init in $(cat ~/files/zones.txt); do
echo ${country} `cat ~/lists/$init.zone| wc -l`
done
done
#desired output
argentina 2000
brazil 400
china 5000
#wrong output I keep getting
argentina 2000
argentina 400
argentina 5000
brazil 2000
brazil 400
brazil 5000
china 2000
china 400
china 5000
Need some help here ..
country=(argentina brazil china)
for (( i=0; i < ${#country}; i++ )); do
for init in $(cat ~/files/zones.txt); do
echo ${country} `cat ~/lists/$init.zone| wc -l`
done
done
#desired output
argentina 2000
brazil 400
china 5000
#wrong output I keep getting
argentina 2000
argentina 400
argentina 5000
brazil 2000
brazil 400
brazil 5000
china 2000
china 400
china 5000