ubitem

NAME

ubitem – execute a command on selected items

SYNOPSIS

ubitem -[C* E F* H* L Q S d f* g* i k# w*] <item>

DESCRIPTION

ubitem displays a list of text items on a formatted screen. The first item is highlighted and the highlighting can be moved up and down the list by using the arrow keys. The highlighted item can be selected (indicated by a `*’) or deselected by pressing the AB key. Pressing one of the programed FUNCTION KEYS will execute a predetermined script for each item.

F1 (SEARCH) can be used to find an entry by entering a string. EXIT can be used to exit without doing anything.

Pressing RETURN will execute the first defined function key with the currently selected list.

If no items are selected when a function key or RETURN is pressed, the currently highlighted record will be automatically selected.

The list of items to choose from can be a file, output from a unix command, read from standard input, or text values stored in the command file.

Depending on the configuration single or multiple selections may be made.

A selection list consists of lines of text. Each line has one or two parts. A return value and a display value. If there is only one part then it is used for both display and return. The two parts of each line are separated by a ‘:’. This may be changed – see command line options below.

When a script is executed, the return values of the selected items are passed as arguments to the script.

After reading the selection list, ubitem displays some (or all depending on screen size) of the list with the first item highlighted. The user can use the arrow keys to move the highlighting up or down the list. The list will scroll as appropriate.

The format for file, the control file, can be found in item(4).

FLAGS

COMMAND LINE FLAGS
FLAG ARGUMENT TYPE DESCRIPTION
-C control file text file name security control file for menus. See menu(4) for details.
-E disable EXIT key
-F file text file name Name of file containing list of items
-S read the selection list from standard input
-d debug output. Echo each line as it is read
-f separator character Use separator to separate the return value from the display value. The default value is `:’.

ERRORS

EXAMPLE

To run the item list program select.itm

ubitem select

To select a user from the passwd file (using user.itm)

awk '{print $1":"$5}' /etc/passwd|ubitem -S user

SEE ALSO

item(4)