Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 496 Bytes

skip.md

File metadata and controls

21 lines (15 loc) · 496 Bytes

Skipping a number of records

When input contains a CSV header or any other table header commonly found in process output, the skip filter may be of help.

<?php
use ZeroConfig\Cli\Reader\StandardIn;
use ZeroConfig\Cli\Transformer\Sequence\SkipFilter;
use ZeroConfig\Cli\Writer\File;

$input  = new StandardIn();
$output = new File('records.csv');
$filter = new SkipFilter(1);

$output($filter($input));

Further reading

See other available transformers.