File: cmdrefcard.pl

package info (click to toggle)
gri 2.12.26-1
  • links: PTS
  • area: main
  • in suites: buster, sid
  • size: 5,952 kB
  • ctags: 2,396
  • sloc: cpp: 36,598; sh: 4,196; lisp: 3,764; perl: 1,362; ansic: 1,046; makefile: 606
file content (17 lines) | stat: -rwxr-xr-x 387 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl -w
# Scan for commands in gri.cmd
# Usage:
#   ./cmdrefcard.pl ../gri.cmd
while(<>) {
    if (/^\`(.*)\'$/) {
        $a = $1;
        $a =~ s/^\`//;
        $a =~ s/\'\$//;
        $a =~ s/\\/\$\\backslash\$/g;
        $a =~ s/\{/\$\\lbrace\$/g;
        $a =~ s/\}/\$\\rbrace\$/g;
        $a =~ s/\|/\$\\mid\$/g;
        $a =~ s/_/\\_/g;
        print "$a\n\n";
    }
}