grigoris Astronomy February 16, 2011 February 16, 2011 Sometimes, a variable may be needed to get inside awk (for or while loop for example). In order to pass the variable inside awk, include it like: awk -v i=$i '{ .. }' test