bag2php/p-command

AWK like PHP wrapper for command line

Maintainers

👁 zonuexe

Package info

github.com/bag2php/p-command

pkg:composer/bag2php/p-command

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master 2019-09-02 10:58 UTC

Requires

None

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MPL-2.0 32dc1adfec535e2559247a7ebae467dea1aa975b

This package is auto-updated.

Last update: 2026-06-08 14:17:11 UTC


README

p command is inspired by AWK, rb and opy.

Special variable

  • User-modified variables:
    • string $OFS - Output Field Separator (default: ) [AWK compatible]
    • string $ORS - Output Record Separator (default: PHP_EOL) [AWK compatible]
  • Auto-set variables:
    • int $NR - The number of input records [AWK compatible]
    • int $FNR - The current record number in the current file [AWK compatible]
    • string $F0 - Contains current line
    • string[] $F - Contains fields separated by $OFS [AWK compatible]
    • int $NF - The number of fields in $F [AWK compatible]
    • int $argi - Same as $NR [PHP compatible]
    • string $argn - Same as $F0 [PHP compatible]