I am new in awk , I face problem while i try to use for loop in awk,
I am using ksh, i am trying to set a for loop which runs as man times as the records in a file , the for loop like for(a=1;a<=5;a++) is working in my awk script but the one i need is not working :wall:
for example
Sorry i confused u guys, my question is that how i use this for loop in awk , the simple for loop is running but when i try to put it between awk it fails .
Thinks this is what you're after, each version does exactly the same as that shell snippet, but each time it removes one layer of default action that awk does for you to demonstrate how you can override different parts when you require more control.
I was working to make a script in which a little part involve to clean data on some of the field using another file as a refrence , so what i am thinking is that while awk reading each record i put a for loop which check for correct value from the refrence file. and these data file are huge and also the refrence file have hundreads of records.
I have used many time this
for x in `cat any_file`
in shell script its very help full but this time i want it in my awk and its not working ............alassss
can any buddy suggest some other solution to this ???