Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.0 KiB

  1. BEGIN {
  2. FS="\t"
  3. # printf " set INITsav=%%INIT%%\n"
  4. # printf " set HOMEsav=%%HOME%%\n"
  5. # printf " set INIT=\bin\n"
  6. # printf " set HOME=\bin\n\n"
  7. # printf ":ftpTop\n"
  8. # printf " ftp dogwood command mkbat1.ftp > nul\n"
  9. # printf " if errorlevel 1 goto ftpTop\n"
  10. }
  11. {
  12. if ($0 !~ /^;/)
  13. {
  14. if (NF == 11)
  15. {
  16. printf "\n echo Processing %s (%s.%s)\n",$1,$2,$3
  17. printf " if exist infile del infile\n"
  18. for (i=1 ; i<=NF ; i++)
  19. {
  20. if ($i == "" || $i == " ")
  21. printf "echo.>> infile\n"
  22. else
  23. printf "echo %s >> infile\n",$i
  24. }
  25. printf "\n:%dTop\n",NR
  26. # printf " ftp dogwood command mkbat2.ftp > nul\n"
  27. # printf " if errorlevel 1 goto %dTop\n\n",NR
  28. printf " sed \"s/ $//\" infile | gawk -f _objType_2.awk > outfile\n"
  29. printf " if errorlevel 1 goto %dTop\n\n",NR
  30. printf " set n=1\n"
  31. printf " if exist %s\\_tgtType__objType_%%n%%.bat set n=2\n",$1
  32. printf " if exist %s\\_tgtType__objType_%%n%%.bat set n=3\n",$1
  33. printf " if exist %s\\_tgtType__objType_%%n%%.bat set n=4\n",$1
  34. printf " if exist %s\\_tgtType__objType_%%n%%.bat set n=5\n",$1
  35. printf " if exist %s\\_tgtType__objType_%%n%%.bat set n=6\n",$1
  36. printf " if exist %s\\_tgtType__objType_%%n%%.bat set n=7\n",$1
  37. printf " if exist %s\\_tgtType__objType_%%n%%.bat set n=8\n",$1
  38. printf " if exist %s\\_tgtType__objType_%%n%%.bat set n=9\n",$1
  39. printf " copy outfile %s\\_tgtType__objType_%%n%%.bat\n",$1
  40. printf " set n=\n"
  41. printf " del infile\n"
  42. printf " del outfile\n"
  43. }
  44. else
  45. printf "\n echo ERROR: Not 11 fields - %s (%s.%s)\n",$1,$2,$3
  46. }
  47. }
  48. END {
  49. # printf " set INIT=%%INITsav%%\n"
  50. # printf " set HOME=%%HOMEsav%%\n"
  51. # printf " set INITsav=\n"
  52. # printf " set HOMEsav=\n"
  53. }