*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> s2p (1)              



NAME    [Toc]    [Back]

       s2p - Sed to Perl translator

SYNOPSIS    [Toc]    [Back]

       s2p [options] filename

DESCRIPTION    [Toc]    [Back]

       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    [Toc]    [Back]

       Options include:

	    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    [Toc]    [Back]

       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    [Toc]    [Back]

       s2p uses no environment variables.

AUTHOR    [Toc]    [Back]

       Larry Wall <larry@wall.org>

FILES    [Toc]    [Back]

	perl   The perl compiler/interpreter

	a2p    awk to perl translator

DIAGNOSTICS    [Toc]    [Back]

3rd Berkeley Distribution	  2004-12-24				S2P(1)
[ Back ]
 Similar pages
Name OS Title
a2p Linux Awk to Perl translator
a2p IRIX Awk to Perl translator
a2p OpenBSD Awk to Perl translator
perlcompile OpenBSD Introduction to the Perl Compiler-Translator
perljp OpenBSD AEuEU,i Perl Y~YxYE `A^a`I`A Perl xIAx3|xOxex|x3x1/2! Perl 5.8.0 xexeicUni- _ codeYuYYi1/4YEx~AcEyxE...
pppoe OpenBSD PPP Over Ethernet translator
textps IRIX Text to PostScript translator
pdf2ps Linux Ghostscript PDF to PostScript translator
faithd OpenBSD FAITH IPv6/v4 translator daemon
XmTranslateKey HP-UX The default keycode-to-keysym translator
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service