codekingpro/portable-devtools
114k
1# rewind.awk --- rewind the current file and start over2#3# This file and how to use it are described in the manual.4# Therefore, we respectfully advise you to Read The Fine Manual5# for more information.6#7# Arnold Robbins, arnold@skeeve.com, Public Domain8# September 20009 10function rewind( i)11{12 # shift remaining arguments up13 for (i = ARGC; i > ARGIND; i--)14 ARGV[i] = ARGV[i-1]15 16 # make sure gawk knows to keep going17 ARGC++18 19 # make current file next to get done20 ARGV[ARGIND+1] = FILENAME21 22 # do it23 nextfile24}25 