i need to change an entry in file
the file has 26 unique entried (unique on city name)
first i need to find the city name
then go backwards to the 26th char and change one measly number!
example:
111.11.111|1234|222.22.222|4321|DALLAS_PORT|PRIMARY|333.33.333|PORT|DALLAS_PORT|SECONDARY
what i need to do is find dallas, and change the last 2 in the ip address (222.22.222) to a 3. i have tried awk sed, cut etc. but i seem to keep changing more than the one city i need to change (there are other city names with the same ip and i dont want to touch them)
thanks!)
the file has 26 unique entried (unique on city name)
first i need to find the city name
then go backwards to the 26th char and change one measly number!
example:
111.11.111|1234|222.22.222|4321|DALLAS_PORT|PRIMARY|333.33.333|PORT|DALLAS_PORT|SECONDARY
what i need to do is find dallas, and change the last 2 in the ip address (222.22.222) to a 3. i have tried awk sed, cut etc. but i seem to keep changing more than the one city i need to change (there are other city names with the same ip and i dont want to touch them)
thanks!)