rectype.awk
上传用户:tsgydb
上传日期:2007-04-14
资源大小:10674k
文件大小:1k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. # $Id: rectype.awk,v 11.3 2000/07/17 22:00:49 ubell Exp $
  2. #
  3. # Print out a range of the log
  4. # Command line should set RECTYPE to the a comma separated list
  5. # of the rectypes (or partial strings of rectypes) sought.
  6. NR == 1 {
  7. ntypes = 0
  8. while ((ndx = index(RECTYPE, ",")) != 0) {
  9. types[ntypes] = substr(RECTYPE, 1, ndx - 1);
  10. RECTYPE = substr(RECTYPE, ndx + 1, length(RECTYPE) - ndx);
  11. ntypes++
  12. }
  13. types[ntypes] = RECTYPE;
  14. }
  15. /^[/{
  16. printme = 0
  17. for (i = 0; i <= ntypes; i++)
  18. if (index($1, types[i]) != 0) {
  19. printme = 1
  20. break;
  21. }
  22. }
  23. {
  24. if (printme == 1)
  25. print $0
  26. }