Hi I need a shell script
My requirement is something like adding entries to a file
cat fielname will have below 5 lines
ServerName:Test
Connection Attempt:yes
Connection retries:3
Max Sessions:5
Communication address:172.24.3.11
I have one such entry in a file.
Say i want to add more such entry with servername and Communication address going to change values and other variables remain same.
I want to device a script like i will grep for servername and if server name is present i will exit the script
if servername is not present i add a new entry
followed by communication address
my final file should be like this
ServerName:Test
Connection Attempt:yes
Connection retries:3
Max Sessions:5
Communication address:172.24.3.11
new entry added
ServerName:Test1
Connection Attempt:yes
Connection retries:3
Max Sessions:5
Communication address:172.24.3.12
It is a script for Connect Direct file transfer and i am trying to automate the update netmap entry so that i don't have to manually enter the server node and ip address.
The server and the communication address change everytime a new server is being added.