Quiq::Ipc - Interprozesskommunikation
Quiq::Object
$out = Quiq::Ipc->filter($cmd,$in,@opt); ($out,$err) = Quiq::Ipc->filter($cmd,$in,@opt); $out = Quiq::Ipc->filter($cmd,@opt); ($out,$err) = Quiq::Ipc->filter($cmd,@opt);
Ignoriere Exitcode von Kommando $cmd. D.h. es wird keine Exception geworfen, wenn das Kommando fehlschlägt.
Rufe Kommando $cmd als Filter auf. Das Kommando erhält die Daten $in auf stdin und liefert die Daten $out und $err auf stdout bzw. stderr. In Skalarkontext wird nur die Ausgabe auf stdout geliefert.
Achtung: Der Aufruf kann zu einem SIGPIPE führen, wenn per Parameter $in Daten an $cmd gesendet werden und das Kommando terminiert, bevor es alle Daten gelesen hat. Insbesondere sollten keine Daten an ein Kommando gesendet werden, das nicht von stdin liest!
$class->pipeTo($data,$cmd,@options);
Die Daten, die an das Kommando gepiped werden.
Das Kommando, das die Daten von stdin liest und verarbeitet.
Mit welchem Encoding die Daten geschrieben werden.
Pipe die Daten nicht an das Kommando, sondern schreibe sie nach STDOUT. Dies ist nützlich, wenn das Kommando ein Pager ist, der nicht gestartet werden soll, wenn STDOUT kein Terminal ist:
Quiq::Ipc->pipeTo($data,'less -R',-toStdout=>!-t);
Pipe Daten $data an Kommando $cmd.
1.210
Frank Seitz, http://fseitz.de/
Copyright (C) 2023 Frank Seitz
This code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Quiq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Quiq
CPAN shell
perl -MCPAN -e shell install Quiq
For more information on module installation, please visit the detailed CPAN module installation guide.