piktc View Files Option
[posted 2004/10/26]
[Notes issued with the release of PIKT 1.18.0pre2, which introduced the new piktc vieW files options, -w & -W.]
Fulfilling another user request, we have implemented two new piktc options,
-w view alert/script/program/file/object actual file(s) -W view alert/script/program/file/object authorized file(s)
Suppose you have edited your piktmaster configuration files and you want to view a new file version before installing it on the PIKT slave(s). To view syslog.conf for slave system montreal--as it is configured in the piktmaster files.cfg (or one of its #include files)--you might do this
# piktc -W +F syslog.conf +H montreal
which would show montreal's syslog.conf--as it is configured in the central configuration.
To view montreal's actual syslog.conf, you would instead do this
# piktc -w +F syslog.conf +H montreal
which would fetch syslog.conf from the montreal system and cat it to your display on the piktmaster.
If you view files for one or more systems, doing for example
# piktc -W +F all +H all
the files would all run together, with no headers to indicate file names or system names. You would instead want to add the '-v' (verbose) option, for example
# piktc -Wv +F all +H all
Note that, since by using the piktc -W option you now have the means of viewing a configuration file as defined on the piktmaster, you may redirect that output to a different file name or pipe, say to scp or do something else with it.
For more examples, see Developer's Notes.