generate-text-files.pl

来自「这是linux下运行的mysql软件包,可用于linux 下安装 php + m」· PL 代码 · 共 44 行

PL
44
字号
#!/usr/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 "Cannot open $from: $!";$in = 0;while (<IN>){  if ($in)  {    if (/Node: $tnode,/ || /\[index/)    {      $in = 0;    }    elsif (/^File: mysql.info/ || (/^/))    {      # Just Skip node beginnings    }    else    {      print;    }  }  else  {    if (/Node: $fnode,/)    {      $in = 1;      # Skip first empty line      <IN>;    }  }}close(IN);die "Could not find node \"$tnode\"" if ($in == 1);exit 0;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?