The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

sh2perl - convert Bourne shell script to Perl program

SYNOPSIS

 sh2perl shell-script >perl-program
 sh2perl <shell-script | perl - shellarg1 shellarg2 shellarg3 ...

DESCRIPTION

sh2perl takes a shell script specified on the command line (or from standard input) and produces a comparable Perl script on the standard output.

The program should operate identically within the scope of the possible emulation, and at speeds comparable, if not faster, than the original shell script.

SEE ALSO

a2p, s2p, perl

AUTHOR

Randal L. Schwartz, merlyn@stonehenge.com, http://www.stonehenge.com/merlyn/.

BUGS

If your shell script contains a single line consisting of:

  StuffyFunk

all following text will be ignored. Future versions of sh2perl may eliminate this bug.

Handles the One True Shell (/bin/sh) only. Other shells will probably not be supported. (Use the csh2sh tool first on C-shell scripts.)

PERL TRAINING

Learn Perl now! Visit our website at http://www.stonehenge.com/perltraining/!