Content-type: text/html
Manpage of iconf
iconf
Section: User Commands (1)
Index
NAME
iconf
- Automates configuration file editing according to user defined configurations.
VERSION
This manual has been updated for
iconf 0.3b
SYNOPSIS
iconf
[ -options ]
-c
config
[
-i
input ]
[
-o
output ]
DESCRIPTION
iconf
modifies the input file according to the configurations written in the config file, and write the resulting file as the output file.
iconf
should be flexible enough to be configured to edit different configuration files.
The program options may be set in the configuration file, which override the command line options passed to the program. See the section
CONFIGURATION
for more details.
The primary aim of the program is to let the system administrator easily write scripts to help automate the configuration file editing on the users' end. On systems with
iconf
installed, all the system admistrator has to do is to write a configuration file and a simple shell script to run
iconf
with the right arguments. The users only need to run the shell script, which is pretty much painless.
OPTIONS
- -c config
-
Specify the configuration file, which contains information on how the input file will be modified. This must be passed at the command line.
- -i input
-
Specify the input file, which is the file to be modified. The output doesn't overwrite the input file. It's written in the output file instead. This may be set in the configuration file.
- -o output
-
Specify the output file, where the resulting output will be written. This may be set in the configuration file.
- -1
-
Match each setting only once.
- -d string
-
Use "string" as the option value separator. The default value is "=".
- -f
-
Overwrites the output file.
- -h
-
Show the program help message.
- -r
-
Search separator from right to left.
- -s
-
Keep leading and trailing white space.
- -v
-
Turn on verbose mode.
- -L
-
Show the program license agreement.
- -V
-
Show the program version information.
Note that the -c option is NOT optional.
CONFIGURATION
The configuration file, which is passed as the -c option should contain the target configurations. For instance, if the configuration file has a line like,
-
Option 1 = Values
the program will search for "Option 1" in the input file and replace the original value with the one in the configuration file. In this case, "Values".
The configuration file may contains comments. Any line that begins with the hash '#' character is treated as comments and is ignored, except lines that start with '#SET' which is used to set program options in the configuration file.
Program options can be set in the configuration file by writing "#SET" lines. These option settings are case insensitive and the spacing is flexible, with an exception that there must not be any white space (or any other characters) between the hash '#' and 'SET'.
- #SET SEPARATOR STRING
-
Use "string" as the option value separator.
- #SET INFILE STRING
-
Set the input filename to "string".
- #SET OUTFILE STRING
-
Set the output filename to "string".
- #SET MATCHONCE 1
-
Match each setting only once.
- #SET FROMRIGHT 1
-
Search separator from right to left.
- #SET KEEPSPACE 1
-
Keep leading and trailing white space.
- #SET OVERWRITE 1
-
Overwrites the output file.
For the boolean options, setting them to 0 will turn off the option. Writing '#SET' lines is the preferred way of setting the program options as the user won't have to know about the nature of the input file to decide which option to pass in the command line.
EXAMPLES
Here's a sample configuration file...
-
# This is a comment line
#SET SEPARATOR "="
#SET MATCHONCE 0
alias du='/usr/bin/du -h'
alias lpq='lpq -Plp0'
In this case, the program will look for the options "alias du" and "alias lpq" in the input file, and replace the original values with those written in the configuration file. The program will use "=" as the option value separator and each occurence of each option in the input file will be changed, as what the '#SET' lines said.
AUTHOR
Bernard yap <levitd@users.sourceforge.net>
Index
- NAME
-
- VERSION
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- CONFIGURATION
-
- EXAMPLES
-
- AUTHOR
-
This document was created by
man2html,
using the manual pages.
Time: 10:30:31 GMT, March 08, 2002