I have this script
tests=()
igrepy -l $1 . | while read -r line
do
// some processing
tests+=("${second[0]}")
done
echo ${tests[@]}
I've checked that 'second' has a result and it does, however my echo returns a blank string. What has gone wrong here? This is on rhel6, 'igrepy' is an alias to a case insensitive grep that only search python files