ksc_replace
This command is used to edit the contents of a file and place it into another file. This command works in a way similar to the sed utility and supports the same substituting expressions.
The files must be located on the PPM Server in the [AS.PKG_TRANSFER_PATH] directory. This requires the use of the ksc_ copy_tmp_* commands.
ksc_replace parameters
| Parameter | Default token | Description |
|---|---|---|
| FILENAME | [P.P_FILENAME] | Name of the source file to be edited |
| OUTFILE | [OUTFILE] | Name of the output file after applying the substitution expressions |
| SUBST | The substitution expression |
Example using ksc_replace
ksc_copy_server_tmp FILENAME=”config.template” FILE_ TYPE=”ASCII”
ksc_replace FILENAME=”config.template” OUTFILE=”config.cfg” SUBST=”s/NAME/[P.NAME]/g”
ksc_copy_tmp_server FILENAME=”config.cfg”

