What I am trying to do is make a script that will add a port number within a section of a file if it already doesn't exist in that section of the file. The particular line that I would like to add the port number to in the file is formatted like this:
TCPPORTS="25 80 125 443 8080 10000"
For example, I would like to add the port 1701 to this series of numbers. inside the quotes, if it doesn't already exist. It would end up looking like the following:
TCPPORTS="25 80 125 443 8080 10000 1701"
I hope that is explained clearly enough.
Thanks