On Sun, Sep 16, 2012 at 3:53 PM, Teemu Likonen <tlikonen@iki.fi> wrote: > Maybe not what you are asking for but one can get the desired output > with these: > > $ awk 'NR >= 1 && NR <= 3 { print }' inputfile > > $ head -n3 inputfile > > $ sed -n 1,3p inputfile > thanks, Teemu. i already know that, but right now i need to understand how passing for loop bash variables to awk works.