#!/usr/bin/gawk -f # Standardize the output of running commando. # # Convert #PIDs in commando output to %1, %2, etc so that output can # be relied upon in testing. # # Eliminate @!!! messagse which may occur at unexpected times BEGIN{ curpid = 0 alerts = "" } # Substitute PIDs for %%%%%1 and such { while(match($0,/#[0-9]+/)!=0){ p=substr($0,RSTART,RLENGTH) if(!(p in PIDS)){ num = sprintf("%%%d",curpid) # get the width of the replacement to match for(i=length(num); i