I've been using this grep invocation to trim comments out of config files. Comments are useful, but difficult to get only the active configuration entries which will be less than 20 or 25 lines from a very long file.
$ grep ^[^#] /etc/ntp.conf
The regex ^[^#] matches the first character of any line, as long as that character that is not a #. Because blank lines don't have a first character they're not matched either, resulting in a nice compact output of just the active configuration lines.
Your comments are always welcome.
Regards
Shiroy Pigarez
Monday, March 8, 2010
Subscribe to:
Post Comments (Atom)
Procedure to clearing the ConfigMgr (SCCM) client local cache (CCM cache) -Resolving Disk space isssue
Essentially the client cache is a temporary download location for software, applications and software updates that are deployed to a clie...
-
O perating system Windows 2008 Server/ Windows 7 Scenario After replacing the motherboard, need to assign old IP configurations But u...
-
Error 1075: The dependency service does not exist or has been marked for deletion" Release: Windows XP. ...
-
Essentially the client cache is a temporary download location for software, applications and software updates that are deployed to a clie...
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.