I am trying find and replace the line one of the existing file, when I am running the below sed
command it is replacing all the lines which have the matched string, but instead I want to change only one place inside the file.
sed -i 's/azure.com/test.com/' file_name
Actual file
server_name azure.com
server_name azure.com
Expected result
server_name test.com
server_name azure.com