Commit | Line | Data |
8d063cd8 |
1 | .rn '' }` |
378cc40b |
2 | ''' $Header: s2p.man,v 2.0 88/06/05 00:15:59 root Exp $ |
8d063cd8 |
3 | ''' |
4 | ''' $Log: s2p.man,v $ |
378cc40b |
5 | ''' Revision 2.0 88/06/05 00:15:59 root |
6 | ''' Baseline version 2.0. |
8d063cd8 |
7 | ''' |
8 | ''' |
9 | .de Sh |
10 | .br |
11 | .ne 5 |
12 | .PP |
13 | \fB\\$1\fR |
14 | .PP |
15 | .. |
16 | .de Sp |
17 | .if t .sp .5v |
18 | .if n .sp |
19 | .. |
20 | .de Ip |
21 | .br |
22 | .ie \\n.$>=3 .ne \\$3 |
23 | .el .ne 3 |
24 | .IP "\\$1" \\$2 |
25 | .. |
26 | ''' |
27 | ''' Set up \*(-- to give an unbreakable dash; |
28 | ''' string Tr holds user defined translation string. |
29 | ''' Bell System Logo is used as a dummy character. |
30 | ''' |
378cc40b |
31 | .tr \(*W-|\(bv\*(Tr |
8d063cd8 |
32 | .ie n \{\ |
378cc40b |
33 | .ds -- \(*W- |
34 | .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch |
35 | .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch |
8d063cd8 |
36 | .ds L" "" |
37 | .ds R" "" |
38 | .ds L' ' |
39 | .ds R' ' |
40 | 'br\} |
41 | .el\{\ |
42 | .ds -- \(em\| |
43 | .tr \*(Tr |
44 | .ds L" `` |
45 | .ds R" '' |
46 | .ds L' ` |
47 | .ds R' ' |
48 | 'br\} |
49 | .TH S2P 1 NEW |
50 | .SH NAME |
51 | s2p - Sed to Perl translator |
52 | .SH SYNOPSIS |
53 | .B s2p [options] filename |
54 | .SH DESCRIPTION |
55 | .I S2p |
56 | takes a sed script specified on the command line (or from standard input) |
57 | and produces a comparable |
58 | .I perl |
59 | script on the standard output. |
60 | .Sh "Options" |
61 | Options include: |
62 | .TP 5 |
63 | .B \-D<number> |
64 | sets debugging flags. |
65 | .TP 5 |
66 | .B \-n |
67 | specifies that this sed script was always invoked with a sed -n. |
68 | Otherwise a switch parser is prepended to the front of the script. |
69 | .TP 5 |
70 | .B \-p |
71 | specifies that this sed script was never invoked with a sed -n. |
72 | Otherwise a switch parser is prepended to the front of the script. |
73 | .Sh "Considerations" |
74 | The perl script produced looks very sed-ish, and there may very well be |
75 | better ways to express what you want to do in perl. |
76 | For instance, s2p does not make any use of the split operator, but you might |
77 | want to. |
78 | .PP |
79 | The perl script you end up with may be either faster or slower than the original |
80 | sed script. |
81 | If you're only interested in speed you'll just have to try it both ways. |
82 | Of course, if you want to do something sed doesn't do, you have no choice. |
83 | .SH ENVIRONMENT |
84 | S2p uses no environment variables. |
85 | .SH AUTHOR |
86 | Larry Wall <lwall@jpl-devvax.Jpl.Nasa.Gov> |
87 | .SH FILES |
88 | .SH SEE ALSO |
89 | perl The perl compiler/interpreter |
90 | .br |
91 | a2p awk to perl translator |
92 | .SH DIAGNOSTICS |
93 | .SH BUGS |
94 | .rn }` '' |