- 1 名前:nobodyさん [02/11/01 18:06 ID:umVq3FGM]
- ・7行×79文字
・Perl どうぞ。
- 288 名前:nobodyさん mailto:sage [04/03/17 17:15 ID:???]
- 汎用 TSV ヴューア
#!/usr/local/bin/perl use CGI":all";charset$C='EUC-JP';*P=*param;($f=P(f))=~/[^\w*\-.?\[\\\]]/&¨$ w=P(w)||"\t";chomp(@l=map{open(_)?grep(/\Q$w/,<_>):()}grep/$f/o&&-f,<*>)if$f;%l =(f,"target file regex",w,"search word",o,"output file name");put(($o=P(o))?( "Content-Type: text/tab-separated-values\nContent-Disposition: attachment;file" ."name=$o\n\n",@l):(header,start_html(-title=>'7tsview',encoding,$C,lang,ja), table({border,1},Tr[map{td[split/\t/]}@l]),startform(0,url),p(map{$l{$_}, textfield($_,'',40).br}f,w,o),endform,end_html))
- 289 名前:nobodyさん mailto:sage [04/03/17 17:27 ID:???]
- use CGI":all";charset$C='EUC-JP';*P=*param;($f=P(f))=~/[^\w*\-.?\[\\\]]/&¨$
w=P(w)||"\t";chomp(@l=map{open(_)?grep(/\Q$w/,<_>):()}grep/$f/o&&-f,<*>)if$f;%l =(f,"target file regex",w,"search word",o,"output file name");put(($o=P(o))?( "Content-Type: text/tab-separated-values\nContent-Disposition: attachment;file" ."name=$o\n\n",@l):(header,start_html(-title=>'7tsview',encoding,$C,lang,ja), table({border,1},Tr[map{td[split/\t/]}@l]),startform(0,url),p(map{$l{$_}, textfield($_,'',40).br}f,w,o),submit(0,go),endform,end_html)) submitを追加
|

|