classes/Shell.php
public static function pipe(/* ... */){
        $cmd = [];
        foreach (func_get_args() as $item) {
            $cmd[] = ($item instanceof static)?$item->getShellCommand():$item;
        }
        return new static(implode(' | ',$cmd));
    }
public static function pipe(/* ... */){
        $cmd = [];
        foreach (func_get_args() as $item) {
            $cmd[] = ($item instanceof static)?$item->getShellCommand():$item;
        }
        return new static(implode(' | ',$cmd));
    }
public static function pipe ( /* ... */ ) { $ cmd = [ ] ; foreach ( func_get_args ( ) as $ item ) { $ cmd [ ] = ( $ item instanceof static ) ? $ item -> getShellCommand ( ) : $ item ; } return new static ( implode ( ' | ' , $ cmd ) ) ; }
Concatenate multiple shell commands via piping
@return Shell The piped shell command
Concatenate multiple shell commands via piping