I have a config.properties file which contains a path like ouputdir=/data1/testdata/output. I am able to extract these in shell and store this path in a variabl
Does your properties file have windows CRLF line endings? your script may think the directory is /data1/testdata/output^M with the trailing carriage return.
sed -n '/^outputdir=/{s///; s/\r$//; p; q}' properties.file