Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 905 Bytes

File metadata and controls

21 lines (17 loc) · 905 Bytes

p - AWK like PHP wrapper for command line

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]