Quantcast
Viewing latest article 7
Browse Latest Browse All 29

Answer by bbeecher for How do I edit a file after I shell to a Docker container?

It is kind of screwy, but in a pinch you can use sed or awk to make small edits or remove text. Be careful with your regex targets of course and be aware that you're likely root on your container and might have to re-adjust permissions.

For example, removing a full line that contains text matching a regex:

awk '!/targetText/' file.txt > temp && mv temp file.txt

(More)


Viewing latest article 7
Browse Latest Browse All 29

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>