Merge Configuration Files Using Program Defaults

Merge Configuration Files Using Program Defaults

The following figure illustrates the command line used to merge configuration options from infile.txt into outfile.txt.

In this example, UPIMERGE executes using program defaults.

Command Line Options

The command line options used in this example are:

Option

Description

-dest

Name of a file used to store the result of the merge.

-source

Name of a file used as input to the merge. If this option is omitted, UPIMERGE assumes input is redirected via stdin.

Merged File Contents

The following table identifies the contents of outfile.txt after UPIMERGE completes.

To obtain this result, UPIMERGE added options from infile.txt that did not exist in outfile.txt (that is, installation_directory, message_level, license_key, and so on). It also preserved the value for the port option by replacing the 7887 value with the currently defined 7850.

UPIMERGE also dropped the commented host option from infile.txt. UPIMERGE ignores any comments in the input file, because merging those lines into the output file would have no effect on the application's behavior.

Finally, UPIMERGE commented out the activity_monitoring and event_generation options introduced by outfile.txt. UPIMERGE cannot distinguish between options for new features and new values for existing options. To prevent the introduction of a new value into an application currently running with application-defined defaults, UPIMERGE's default response is to comment out any option in the output file with no match in the input file.


Keyword

Value

installation_directory

"C:\Program Files\Universal\UCmdMgr"

message_level

info

port

7850

license_product

"UNIVERSAL COMMAND MANAGER"

license_customer

"STONEBRANCH, INC."

license_type

DEMO

license_expiration_date

2012.12.21

license_nt_servers

1

license_key

078B-E180-64E6-3016-EA20-0CF4-58F9-B301

#activity_monitoring

yes

#event_generation

*,x100

Components

Universal Products Install Merge