home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-12-26 | 2.1 KB | 93 lines | [TEXT/MPS ] |
- .rn '' }`
- ''' $RCSfile: s2p.man,v $$Revision: 4.1 $$Date: 92/08/07 18:29:24 $
- '''
- ''' $Log: s2p.man,v $
- .de Sh
- .br
- .ne 5
- .PP
- \fB\\$1\fR
- .PP
- ..
- .de Sp
- .if t .sp .5v
- .if n .sp
- ..
- .de Ip
- .br
- .ie \\n.$>=3 .ne \\$3
- .el .ne 3
- .IP "\\$1" \\$2
- ..
- '''
- ''' Set up \*(-- to give an unbreakable dash;
- ''' string Tr holds user defined translation string.
- ''' Bell System Logo is used as a dummy character.
- '''
- .tr \(*W-|\(bv\*(Tr
- .ie n \{\
- .ds -- \(*W-
- .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
- .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
- .ds L" ""
- .ds R" ""
- .ds L' '
- .ds R' '
- 'br\}
- .el\{\
- .ds -- \(em\|
- .tr \*(Tr
- .ds L" ``
- .ds R" ''
- .ds L' `
- .ds R' '
- 'br\}
- .TH S2P 1 NEW
- .SH NAME
- s2p - Sed to Perl translator
- .SH SYNOPSIS
- .B s2p [options] filename
- .SH DESCRIPTION
- .I S2p
- takes a sed script specified on the command line (or from standard input)
- and produces a comparable
- .I perl
- script on the standard output.
- .Sh "Options"
- Options include:
- .TP 5
- .B \-D<number>
- sets debugging flags.
- .TP 5
- .B \-n
- specifies that this sed script was always invoked with a sed -n.
- Otherwise a switch parser is prepended to the front of the script.
- .TP 5
- .B \-p
- specifies that this sed script was never invoked with a sed -n.
- Otherwise a switch parser is prepended to the front of the script.
- .Sh "Considerations"
- The perl script produced looks very sed-ish, and there may very well be
- better ways to express what you want to do in perl.
- For instance, s2p does not make any use of the split operator, but you might
- want to.
- .PP
- The perl script you end up with may be either faster or slower than the original
- sed script.
- If you're only interested in speed you'll just have to try it both ways.
- Of course, if you want to do something sed doesn't do, you have no choice.
- It's often possible to speed up the perl script by various methods, such
- as deleting all references to $\e and chop.
- .SH ENVIRONMENT
- S2p uses no environment variables.
- .SH AUTHOR
- Larry Wall <lwall@jpl-devvax.Jpl.Nasa.Gov>
- .SH FILES
- .SH SEE ALSO
- perl The perl compiler/interpreter
- .br
- a2p awk to perl translator
- .SH DIAGNOSTICS
- .SH BUGS
- .rn }` ''
-