티스토리 뷰

공부

[sh] sed -i -E "s/old_regexp/new/g" file

승가비 2023. 6. 17. 09:27
728x90
sudo sed -i -E "s/^# tags:/tags:/g" /etc/datadog-agent/datadog.yaml

https://unix.stackexchange.com/questions/78625/using-sed-to-find-and-replace-complex-string-preferrably-with-regex

 

Using sed to find and replace complex string (preferrably with regex)

I have a file with the following contents: <username><![CDATA[name]]></username> <password><![CDATA[password]]></password> <dbname><![CDATA[name]]>&...

unix.stackexchange.com

 

728x90
댓글