{"id":570,"date":"2013-03-27T22:33:45","date_gmt":"2013-03-27T21:33:45","guid":{"rendered":"http:\/\/www.jbahillo.com\/?p=570"},"modified":"2013-07-29T12:39:04","modified_gmt":"2013-07-29T11:39:04","slug":"removing-incorrect-characters-in-files","status":"publish","type":"post","link":"https:\/\/www.jbahillo.com\/?p=570","title":{"rendered":"Removing incorrect characters in files"},"content":{"rendered":"<p>Today I realized that in some files I used, I had a | character that provoked them to be of little use (and provoke misconfiguration on the system), so I thought of removing them in a row. The choice was obvious, use tr to remove these characters, and it was perhaps the easier to script to do:<\/p>\n<pre class=\"brush: bash; auto-links: true; collapse: false; gutter: true; first-line: 1; highlight: []; html-script: false; light: false; pad-line-numbers: true; toolbar: true; wrap-lines: true\">\r\n#!\/bin\/bash\r\nfor e in $(grep -R &quot;|&quot; \/var\/lib\/files\/* | cut -d: -f1)\r\ndo\r\ntr -d &#039;|&#039; &lt; $e &gt; $e\r\ndone\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Today I realized that in some files I used, I had a | character that provoked them to be of little use (and provoke misconfiguration on the system), so I thought of removing them in a row. The choice was&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/www.jbahillo.com\/?p=570\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"ep_exclude_from_search":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[10,96],"tags":[72,73,105,104],"class_list":["post-570","post","type-post","status-publish","format-standard","hentry","category-gnulinux","category-zentyal","tag-bash","tag-script","tag-substitute","tag-tr"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p74T96-9c","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=\/wp\/v2\/posts\/570","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=570"}],"version-history":[{"count":13,"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=\/wp\/v2\/posts\/570\/revisions"}],"predecessor-version":[{"id":694,"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=\/wp\/v2\/posts\/570\/revisions\/694"}],"wp:attachment":[{"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}