util::filter - optex fitler utility module
optex [ --if/--of command ] command
optex [ --isub/--osub function ] command
optex command -Mutil::filter [ options ]
Set input/output filter command. If the command start by &, module function is called instead.
&
Set input/output function. Tis is shortcut for --if &function.
Set color filter to filehandle. You can set color filter for STDERR like this:
--set-io-color STDERR=R
Use comma to set multiple filehandles at once.
--set-io-color STDIN=B,STDERR=R
Set default color to STDOUT and STDERR.
This module is a collection of sample utility functions for command optex.
Function can be called with option declaration. Parameters for the function are passed by name and value list: name=value. Value 1 is assigned for the name without value.
In this example,
optex -Mutil::function(debug,message=hello,count=3)
option debug has value 1, message has string "hello", and count also has string "3".
Set input/output filter.
Reverse output.
Reverse characters in each line.
Shuffle lines.
Colorize text. IO is either of STDOUT or STDERR. Use comma to set both at a same time: STDOUT=C,STDERR=R.
STDOUT
STDERR
STDOUT=C,STDERR=R
Splice lines.
Put timestamp on each line of output.
Gunzip standard input.
Gzip standard input.
To install App::optex, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::optex
CPAN shell
perl -MCPAN -e shell install App::optex
For more information on module installation, please visit the detailed CPAN module installation guide.