# Program Name : 2dselect.ak # Author : Eric Keyser # Email : gekeyser@calgry.net # Date : May 22, 2002 # # You are free to copy and distribute this awk. This permission notice # must be preserved complete on all complete or partial copies. # #Program will take the output of the perl script spids.pl and build a #series of unix move commands to select only those data whose mid point #is inside the range of XY's BEGIN { # FS = "," # comma deliminated files MinX = 481000; MaxX = 590000; MinY = 7620000; MaxY = 7730000; } #Middle { MidX = ($5 + $10) / 2.0; MidY = ($6 +$11) / 2.0; # printf("Y %d %d %d\n",MinY, MidY, MaxY) if ( MidY > MinY && MidY < MaxY ) { # printf("-Y passes %d %d %d\n", MinY, MidY, MaxY) # printf("X %d %d %d\n",MinX, MidX, MaxX) if ( MidX > MinX && MidX < MaxX ) { # printf("-X passes %d %d %d\n", MinX, MidX, MaxX) printf("mv %s window/.\n",$1) } } } END { }