|
How to update the contents in a file conditionally?
Hi All,
I have a data file which has two columns Location and the Count.
The file looks like this
India 1
US 0
UK 2
China 0
What I have to do is whenever I fails to login to Oracle then I have to add 1 to the count for that location.
Whenever my script fails to login to Oracle for a particular location, the script needs to find the record for that location and then change the count. I should not change the count for all the locations, instead I need to change the count only for that location.
Ex: Suppose if I am trying to login to Oracle for India location and fails to login then I have to update the count to 2.
Your help will be greatly appreciated.
Thanks in Advance
Raju
|