Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ s2p(1) — DG/UX R4.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

perl(1)

a2p(1)



s2p(1)                           DG/UX R4.11                          s2p(1)


NAME
       s2p - sed to perl translator

SYNOPSIS
       s2p [options] [filename]

DESCRIPTION
       S2p takes a sed script specified on the command line (or from
       standard input) and produces a comparable perl script on the standard
       output.

   Options
       Options include:

       -Dnumber
            sets debugging flags.

       -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.

       -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.

   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.

       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 $\ and chop.

ENVIRONMENT
       S2p uses no environment variables.

AUTHOR
       Larry Wall <lwall@jpl-devvax.Jpl.Nasa.Gov>

SEE ALSO
       perl(1)   The perl compiler/interpreter
       a2p(1)    awk to perl translator


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026