The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

util::filter - optex fitler utility module

SYNOPSIS

optex [ --if/--of command ] command

optex [ --isub/--osub function ] command

optex command -Mutil::filter [ options ]

OPTION

--if command
--of command

Set input/output filter command. If the command start by &, module function is called instead.

--isub function
--osub function

Set input/output function. Tis is shortcut for --if &function.

DESCRIPTION

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".

FUNCTION

set()

Set input/output filter.

rev_line()

Reverse output.

rev_char()

Reverse characters in each line.

shuffle_line()

Shuffle lines.

splice_line( offset=n, [ length=m ] )

Splice lines.

timestamp( [ format=strftime_format ] )

Put timestamp on each line of output.

gunzip()

Gunzip standard input.

gzip()

Gzip standard input.