grazinggoat2
Systems Engineer
hello
I have an file that has data like this:
prod:admin:batch:weekend:[highlight #FCE94F]endday_load_billing[[/highlight]:SERVER:server1
prod:admin:batch:daily: [highlight #FCE94F]sunday_load_pricing_job1[/highlight]:SERVER:server1
prod:admin:batch:daily:[highlight #FCE94F]sunday_load_pricing_job2[/highlight]:SERVER:server1
I want to update the server names so since each job is name is different the global using vi editor would change all the server names
if i key'd on the server name itself. Plus i don't want to update the weekend job
I've tried the following and several other attempts but none work:
sed 's/prod:admin:batch:daily:[-a-zA-Z0-9_\#\@\.]+:SERVER:server1/SERVER:server1/SERVER:server2/g' /tmp/output.txt
sed -e -r 's/prod:admin:batch:daily:[-a-zA-Z0-9_\#\@\.]+:SERVER:server1/SERVER:server1/SERVER:server2/g' /tmp/output.txt
I have an file that has data like this:
prod:admin:batch:weekend:[highlight #FCE94F]endday_load_billing[[/highlight]:SERVER:server1
prod:admin:batch:daily: [highlight #FCE94F]sunday_load_pricing_job1[/highlight]:SERVER:server1
prod:admin:batch:daily:[highlight #FCE94F]sunday_load_pricing_job2[/highlight]:SERVER:server1
I want to update the server names so since each job is name is different the global using vi editor would change all the server names
if i key'd on the server name itself. Plus i don't want to update the weekend job
I've tried the following and several other attempts but none work:
sed 's/prod:admin:batch:daily:[-a-zA-Z0-9_\#\@\.]+:SERVER:server1/SERVER:server1/SERVER:server2/g' /tmp/output.txt
sed -e -r 's/prod:admin:batch:daily:[-a-zA-Z0-9_\#\@\.]+:SERVER:server1/SERVER:server1/SERVER:server2/g' /tmp/output.txt