generate-text-files.pl
上传用户:tsgydb
上传日期:2007-04-14
资源大小:10674k
文件大小:1k
源码类别:
MySQL数据库
开发平台:
Visual C++
- #!/my/gnu/bin/perl -w -*- perl -*-
- # Generate text files from top directory from the manual.
- $from = shift(@ARGV);
- $fnode = shift(@ARGV);
- $tnode = shift(@ARGV);
- open(IN, "$from") || die;
- $in = 0;
- while (<IN>)
- {
- if ($in)
- {
- if (/Node: $tnode,/)
- {
- $in = 0;
- }
- elsif (/^File: mysql.info/ || (/^/))
- {
- # Just Skip node begginigs
- }
- else
- {
- print;
- }
- }
- else
- {
- if (/Node: $fnode,/)
- {
- $in = 1;
- # Skip first empty line
- <IN>;
- }
- }
- }
- close(IN);