{"id":54,"date":"2018-02-19T17:32:36","date_gmt":"2018-02-19T17:32:36","guid":{"rendered":"http:\/\/www.iam8up.com\/?p=54"},"modified":"2022-12-21T15:17:32","modified_gmt":"2022-12-21T15:17:32","slug":"clean-config-output","status":"publish","type":"post","link":"https:\/\/www.iam8up.com\/?p=54","title":{"rendered":"Clean Config Output"},"content":{"rendered":"<pre><span style=\"color: #212121;\">One of the best alias ideas I've ever seen!\u00a0 This strips all the comments and such out of a config file so you can see, generally, what it looks like to the program reading it.<\/span><br style=\"color: #212121;\" \/><br style=\"color: #212121;\" \/><span style=\"color: #212121;\"># alias<\/span><br style=\"color: #212121;\" \/><span style=\"color: #212121;\">alias cleanconfig='sed -e '\\''s\/#.*\/\/'\\'' -e '\\''s\/[ ^I]*$\/\/'\\'' -e '\\''\/^$\/ d'\\'''<\/span><br style=\"color: #212121;\" \/><br style=\"color: #212121;\" \/><span style=\"color: #212121;\"># cleanconfig \/etc\/ntp.conf<\/span><br style=\"color: #212121;\" \/><span style=\"color: #212121;\">driftfile \/var\/lib\/ntp\/drift<\/span><br style=\"color: #212121;\" \/><span style=\"color: #212121;\">restrict default kod nomodify notrap nopeer noquery<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>One of the best alias ideas I&#8217;ve ever seen!\u00a0 This strips all the comments and such out of a config file so you can see, generally, what it looks like to the program reading it.# aliasalias cleanconfig=&#8217;sed -e &#8216;\\&#8221;s\/#.*\/\/&#8217;\\&#8221; -e &#8216;\\&#8221;s\/[ ^I]*$\/\/&#8217;\\&#8221; -e &#8216;\\&#8221;\/^$\/ d&#8217;\\&#8221;&#8217;# cleanconfig \/etc\/ntp.confdriftfile \/var\/lib\/ntp\/driftrestrict default kod nomodify notrap nopeer noquery<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.iam8up.com\/index.php?rest_route=\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.iam8up.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iam8up.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iam8up.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iam8up.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=54"}],"version-history":[{"count":2,"href":"https:\/\/www.iam8up.com\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions"}],"predecessor-version":[{"id":95,"href":"https:\/\/www.iam8up.com\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions\/95"}],"wp:attachment":[{"href":"https:\/\/www.iam8up.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iam8up.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iam8up.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}