Reputation: 89
I want to replace the below string
su - oracle -c "$agent_home/bin/emctl control agent runCollection ex01cel01:oracle_exadata oracle_exadata_configuration"
to replace with
su - oracle -c "'$agent_home'/bin/emctl control agent runCollection ex01cel01 :oracle_exadata oracle_exadata_configuration"
note:extra single quotes covering the $agent_home
Please help me
Upvotes: 0
Views: 271
Reputation: 26
The following sed command should do it
sed "s|\$agent_home|'\$agent_home'|"
Upvotes: 1