Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with for-loop

Status
Not open for further replies.

ergy

Technical User
Sep 16, 2009
4
DE
hey,
I don't know, what I am doing wrong, but my for-loop is not working anymore.
I always get the error:
"awk: cmd. line:8: (FILENAME=- FNR=1) fatal: arg count 8 greater than total number of supplied arguments"

Code:
cat input_jal.dat |awk '{
zaehler=0			
for (zaehler=0;zaehler<=41;zaehler++)
{
}
}'

Does someone maybe see the mistake I am making...
Thanks for any help,
Ergy
 
Hi

What you posted so far can not lead to such error. And of course, works for me.

Please specify the Awk implementation and version you use. May also be interesting to know which shell you use, on which operating system/distribution.


Feherke.
feherke.ga
 
aaargh,
I found the mistake. I had a sprintf command within awk and used more arguments then existed.

Like: sprintf("%7$s, a, b)

Thanks alot for help,
Ergy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top