This question already has an answer here:
- Using shell variable in awk 4 answers
So. I have problem with my variable "$i" because AWK cant read this. But if I was write "echo $i", It be 1.
for ((i=1; i<=$var; i++))
do
awk '{if(NR==$i) print $1}' /ip
done
Aucun commentaire:
Enregistrer un commentaire