print_header [ "report title" [ indent [ add_hostname ]]]
The customer and the environment part are resolved by server_environment(3) internally.
The output is limited to the current terminal width if the environment variable $PRINT_FIT2WIDTH is not set to False.
This report is intended to be viewed on the terminal. All lines extending the terminal window width will be cut an marked with '>>' to show that there is hidden information.
#!/bin/sh : : print_header "LOCAL USER ACCOUNTS" { echo USERNAME:PASSWD:UID:GID:COMMENT:HOMEDIR:SHELL cat /etc/passwd } | print_list ":" : :
The output of this example will look similar to:
Report: LOCAL USER ACCOUNTS Customer: ACME Environment: [PRODUCTION] ACME Corporation, Swit >> Date: Sun Jan 11 19:44:53 MET 2009 USERNAME PASSWD UID GID COMMENT >> ------------ ------ ----- ----- ------------ >> root x 0 3 root >> bin x 1 1 bin >> daemon x 2 2 daemon >> adm x 3 4 adm >> lp x 4 7 lp >> sync x 5 0 sync >> shutdown x 6 0 shutdown >> halt x 7 0 halt >> (8)
This report is intended to be saved to a file. This is why the environment variable $PRINT_FIT2WIDTH is set to False in this example.
#!/bin/sh : : PRINT_FIT2WIDTH=False; export PRINT_FIT2WIDTH print_header "LOCAL USER ACCOUNTS" { echo USERNAME:PASSWD:UID:GID:COMMENT:HOMEDIR:SHELL cat /etc/passwd } | print_list ":" : :
This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.