__numset(8) deals with number-sets

SYNOPSIS

__numset <set-1-specifier> { + | - | in} <set-2-specifier>

DESCRIPTION

This Program deals with set of numbers and can either remove elements of one set that exists in another set, or merge two sets.

If the second argument is a +, then the two sets are merged. If the second argument is -, the elements in set2 are removed from set1.

If the second argument is the word "in", then it is tested, whether elements of set 1 are also contained in set 2.
  The number of common elements will be the result in that case.

If the first argument is the character # (must be escaped in shell scripts, e.g. write '#'), the result is the number of elements in the set given as second argument. Number set specifiers should not contain whitespace and may consist of numbers, commas and dashes.

EXAMPLES

Examples how to use __numset and the results:

prompt# __numset 1-3,5-9,14 + 10-12

The output will be:
1-3,5-12,14

prompt# __numset 1-3,5-9,14 - 5-13

The output will be:
1-3,14

prompt# __numset 3 - ""

The output will be:
3

In this cases, it gives no output
prompt# __numset "" - 4,6,8

prompt# __numset 3 - 3-5

prompt# __numset # 4-9

AUTHOR

This manual page was written by Rene Mayorga <[email protected]> for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.
 

On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.