LINUX: Using sed to delete lines from files

4,988 views · Published 3 September 2011 · 3:03 · Indexed 22 September 2026

Channel: theurbanpenguin · 2011 · Education

Watch on YouTube

More videos like this on http://www.theurbanpenguin.com  :
One thing you may want to automate from your scripts or command line is to delete lines from files. We looked in an earlier video at using echo to append a line to a file to disable an upstart service; but if you want to enable the service you would need to delete the line. sed -i /^manual/d filename will work a treat for us in this case, lets to a quick look, just 2 minutes this video.

More from this channel