++ed by:
CXW

1 PAUSE user

歌代 和正 (Kaz Utashiro)
and 2 contributors

NAME

util - optex argument utility modules

SYNOPSIS

optex command -Mutil::argv

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

times(count=n,suffix=str)

Multiply each arguments. Default count is 2.

    % optex echo -Mutil::times(count=3) 1 2 3
    1 1 1 2 2 2 3 3 3

Put suffix to duplicated arguments.

    % optex echo -Mutil::times(suffix=.bak) a b c
    a a.bak b b.bak c c.bak
reverse()

Reverse arguments.

proc()

Process substitution.

    % optex diff -Mutil::argv::proc= '<(date)' '<(date -u)'