array=(abc 123 erg cba)
for file in ${array[@]}; do
echo $file | grep -q 2
if [ $? = 0 ]; then
echo $file
fi
done
array=(abc 123 erg cba)
for file in ${array[@]}; do
echo $file | grep -q 2
if [ $? = 0 ]; then
echo $file
fi
done