Sed: Search/Replace to edit files inside Docker containers

root@c460eb9bda94:/usr/local/apache2# sed 's/LogLevel warn/LogLevel debug/' conf/httpd.conf > conf/httpd.conf.changed && mv conf/httpd.conf.changed conf/httpd.conf
  1. Search/Replace in  conf/httpd.conf
  2. Pipe to conf/httpd.conf.changed
  3. move conf/httpd.conf.changed to conf/httpd.conf
Tags