We have a file named parameters.txt which contains in comma separated value:
Also, we have a main file called properties.txt which contains in Line format
I need to pass the comma separated values in parameters.txt and check whether if it is exist in properties.txt. If it is not exist it should print bottom of the properties.txt
For Example, in the properties.txt: db.url, db.status, codesettingsA and codesettimgsB is not there. However, I’m passing from the parameters.txt. It should be appended and the result should be like this in properties.txt:
Note: Already values are declared for db.hostname=hostname, db.username=username and db.password=password in properties file. I'm passing db,hostname,db.username,db.password from parameter file. So, this should ignore the values even after the comma and shouldn't print db,hostname,db.username,db.password
Is there any ways to print them at the bottom page of properties.txt?
Can you provide sample code?