Passe a variável Bash para Grep
for j in {0..16};
do
echo A $i
grep -A 2 " $i " file
done
Hutch Polecat
for j in {0..16};
do
echo A $i
grep -A 2 " $i " file
done