Linux s2p command

Updated: 05/04/2019 by Computer Hope
s2p command

On Unix-like operating systems, the s2p command takes a sed script specified on the command line and produces a comparable perl script on the standard output.

Syntax

s2p [options] [filename]

Options

-D<number> Sets debugging flags.
-n Specifies that this sed script was always invoked with sed -n. Otherwise, a switch parser is prepended to the front of the script.
-p Specifies that this sed script was never invoked with sed -n. Otherwise, a switch parser is prepended to the front of the script.

Examples

s2p myfile

Converts the sed file myfile.

a2p — Creates a Perl script from an AWK script.
perl — Interpreter for the Perl programming language.
sed — A utility for filtering and transforming text.