{"id":1466,"date":"2025-03-09T16:11:10","date_gmt":"2025-03-09T16:11:10","guid":{"rendered":"https:\/\/www.labiol.xyz\/?p=1466"},"modified":"2025-03-09T18:18:40","modified_gmt":"2025-03-09T18:18:40","slug":"linux-text-manipulation","status":"publish","type":"post","link":"https:\/\/www.labiol.xyz\/index.php\/2025\/03\/09\/linux-text-manipulation\/","title":{"rendered":"Linux text manipulation"},"content":{"rendered":"\n<p>This article will grow over time<\/p>\n\n\n\n<figure class=\"wp-block-table alignleft is-style-stripes\"><table><tbody><tr><td><\/td><td>Definition<\/td><td>Command<\/td><\/tr><tr><td>1<\/td><td>Remove all comments including empty line (comments with ; and # like in samba.conf)<\/td><td><code>egrep -v '^[[:space:]]*$|^ *#|^ *;' \/etc\/samba\/smb.conf<\/code><\/td><\/tr><tr><td>2<\/td><td>Find all file with some extension and remove it one by one; works for gnu xargs; 0 argument to properly interpret spaces in path name<\/td><td><code>find . -iname \"*.remove\" -print0 | xargs -0 -I{} rm -rfv \"{}\"<\/code>                                                                                            <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article will grow over time Definition Command 1 Remove all comments including empty line (comments with ; and # like in samba.conf) egrep -v &#8216;^[[:space:]]*$|^ *#|^ *;&#8217; \/etc\/samba\/smb.conf 2 Find all file with some extension and remove it one by one; works for gnu xargs; 0 argument to properly &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3,2],"tags":[],"class_list":["post-1466","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-linux","category-vmware"],"_links":{"self":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts\/1466","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=1466"}],"version-history":[{"count":5,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts\/1466\/revisions"}],"predecessor-version":[{"id":1472,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts\/1466\/revisions\/1472"}],"wp:attachment":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=1466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=1466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=1466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}