File: reduce-patt

package info (click to toggle)
texlive-lang 2012.20120611-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 531,364 kB
  • sloc: perl: 29,862; ansic: 3,234; sh: 1,324; makefile: 1,291; python: 824; ruby: 576; lisp: 485; awk: 431; sed: 138; xml: 57; cs: 2
file content (8 lines) | stat: -rw-r--r-- 231 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
#!/usr/bin/perl -n

if (/^\\patterns{/) { $p=1; print; next; }
if (/^}/) { $p=0; print; next; }
if (!$p) { print; next; }

$p=$_; chomp; y/0-9//d; s/^\./^/; s/\.$/\$/;
print $p if (!system "grep", "-q", "$_", "/tmp/.wl-lc-cyryo");