bag2php/p-command

AWK like PHP wrapper for command line

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

This package is auto-updated.

Last update: 2024-12-08 11:11:48 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]