1BEGIN { n=0 } 2/^#/ {next} 3{ 4 if (cmd[$2] == "") { 5 print "#define " $2 " " n; 6 cmd[$2] = n; 7 } 8 n++; 9} 10 11