nisgrep(1)

NAME
nisgrep - regex searching in NIS+ tables

SYNOPSIS
nisgrep [ -AMPchov ] [ -s sep ] keypat tablename

nisgrep [ -AMPchov ] [ -s sep ] colname=keypat ... tablename

DESCRIPTION
nisgrep can be used to search in NIS+ tables, it accepts regular expressions keypat for the search criteria rather than simple text matches. nisgrep could also search in columns, which are not specifically made searchable at the time of table creation. This makes it more flexible than nismatch(1). In nismatch, the server does the searching, in nisgrep, the server returns all the readable entries and the client does the pattern-matching.

The parameter tablename is the NIS+ name of the table to be searched. If only one key or key pattern is specified without the column name, then nisgrep will search in the first column. Specific named columns can be searched by using the syntax. When multiple columns are searched, only entries that match in all columns are returned. This is the equivalent of a logical join operation.

OPTIONS

-A  This option enables the use of the ALL_RESULTS flag when performing lookups. This will cause all tables specified in tablename's concatenation path to be searched and/or dumped.

-M  Master server only. This option specifies that the request should be sent to the master server of the named data.

-P  Follow concatenation path. This option specifies that the request should follow the concatenation path of a table if the initial search is unsuccessful. This option is only useful when using an indexed name for name and the -o option.

-c  Print only a count of the number of entries that matched the search criteria.

-h  Print in the first line the names of the columns, the line begins with a `#'. The column names are separated by the table separator.

-o  Display the internal representation of the named NIS+ object(s).

-s sep
    This option specifies the character to use to separate the table columns. If no character is specified, the default separator for the table is used.

-v  Display binary data directly. Without this option binary data is displayed as the string *BINARY*

EXIT CODES

nisgrep returns 0 on successfully matches some entries, 1 on successfully searches the table and no matches are found and 2 if an error condition occurs. An error message is also printed.

SEE ALSO
nisls(1), niscat(1), nismatch(1)

AUTHOR
This version of the nisgrep command was written by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>.