Question

I have a property looks like below in property file and the properties are ready by "sourcing" in shell script.

MW_INSTALLER_11.6="/ade_autofs/scratch/test/installer/wls_generic.jar"

During sourcing, observing the below error and the variable is not read. Where all other properties are read perfectly fine.

./upgrade.properties: line 45: MW_INSTALLER_11.6=/ade_autofs/scratch/test/installer/wls_generic.jar: No such file or directory

The file mentioned above is present specified path. Observing same issue with or without double quotes. What is the right way to add the file location in property file?

Code around above specified property in property files

POST_UPGRADE_ANT_OPTIONS=
MW_INSTALLER_11.6="/ade_autofs/scratch/test/installer/wls_generic.jar"
NO_OF_RELEASES_TO_UPGRADE=1

Code around sourcing property file in shell script, here $1 represents property file

echo "Reading properties file $1" | tee -a $LOG_DRIVER_FILE

. ./$1

UPGRADE_PROPERTIES_FILE=$1

thanks In Advance, soman

Was it helpful?

Solution

I found the issue. Issue is due to the variable name contains "." [dot]

after changing from MW_INSTALLER_11.6="/ade_autofs/scratch/test/installer/wls_generic.jar"

to MW_INSTALLER_11_6="/ade_autofs/scratch/test/installer/wls_generic.jar"

It worked fine.

Regards.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top