list_nis_map_with_comment
Use the list_nis_map_with_comment
command to return a list of all map entries for the currently selected NIS map and includes the entries’ comment. If executed in a script, this command outputs its list to stdout
so that the output appears in the shell where the script is executed.
The command does not return a Tcl list back to the executing script. Use get_nis_map or get_nis_map_with_comment to return a Tcl list of NIS map entries for parsing or further processing within the script.
Zone type
Not applicable
Syntax
list_nis_map_with_comment
Abbreviation
lsnmwc
Options
This command takes no options.
Arguments
This command takes no arguments.
Return value
This command returns a list to stdout
of the map entries for the currently selected NIS map. Each map entry in the list contains the following fields separated by colons (:):
- The key
- The instance number of the key
- The value
- The comment
Examples
list_nis_map_with_comment
This example returns map entries similar to the following:
Finance:1:Hank@acme.com,jane@acme.com,joe@acme.com:Finance dept staff
Mktg:1:Mike@acme.com,Sue@acme.com:Marketing dept staff
Related commands
Before you use this command, you must have a currently selected NIS map stored in memory. The following commands enable you to view and select a NIS map:
- get_nis_maps returns a Tcl list of NIS maps in the currently selected zone.
- list_nis_maps lists to
stdout
the NIS maps in the currently selected zone. - new_nis_map creates a new NIS map and stores it in memory.
- select_nis_map retrieves a NIS map from Active Directory and stores it in memory.
After you have a NIS map stored in memory, you can use the following commands to work with that map:
- add_map_entry or add_map_entry_with_comment adds a map entry to the currently selected NIS map.
- delete_map_entry removes an entry from the currently selected NIS map.
- delete_nis_map deletes the selected NIS map from Active Directory and from memory.
- get_nis_map or get_nis_map_with_comment returns a Tcl list of the map entries in the currently selected NIS map.
- get_nis_map_field reads a field value from the currently selected NIS map.
- list_nis_map lists to
stdout
the map entries in the currently selected NIS map. - save_nis_map saves the selected NIS map with its current entries to Active Directory.