Learning Linux Lesson 31 Using SED to clean config files
4,749 views · Published 28 February 2013 · 11:14 · Indexed 14 October 2026
Channel: theurbanpenguin · 2013 · Education
More videos like this online at http://www.theurbanpenguin.com
In this video we see the power of the Linux command line using SED. We have seen many configuration files that are documented with commented lines and blank lines. This is fine and easy to maintain by deleting lines that begin with a # or begin with the end of line marker $. However if the line is indented and then commented it is is much more difficult. Was it tabbed in, spaced in and and how many spaces. Fortunately regex can help with this with POSIX notation. It look ugly but works: '/^[[:space:]]\{1,\}/d' . Watch the video and see the magic happen
More from this channel
-
8:44
Bash History Demo
-
8:39
A bash script to backup the MBR of all drives
-
9:40
Using SQUID to implement time restrictions . Captions Avaiable
-
6:24
Creating Desktop Shortcuts
-
8:58
Scripting Apache Virtual Hosts
-
5:25
Accessing The Linux Command Line
-
8:42
Managing Global Gnome Settings
-
2:40
NFSv4 Crossmnt Option