a2p Linux Commands

What is Linux a2p Command?

Explanation

a2p COMMAND:

a2p - Awk to Perl translator
A2p takes an awk script specified on the command line (or from standard input) and produces a comparable perl script on the standard output.

SYNTAX :


a2p [options] [filename]

OPTIONS:


-D<number> sets debugging flags.
-F<character> tells a2p that this awk script is always invoked with this -F switch.
-n<fieldlist> specifies the names of the input fields if input does not have to be split into an array.
-<number> causes a2p to assume that input will always have that many fields.

EXAMPLE:


a2p myfile - would convert the file myfile.

Awk to perl translator scripts are often embedded in a shell script that pipes stuff into and out of awk. Often the shell script wrapper can be incorporated into the perl script, since perl can start up pipes into and out of itself, and can do other things that awk can't do by itself.

Ask Questions

Ask Question