{"id":3807,"date":"2011-02-21T12:07:07","date_gmt":"2011-02-21T12:07:07","guid":{"rendered":""},"modified":"2026-04-18T22:52:06","modified_gmt":"2026-04-18T22:52:06","slug":"im-a-nerd-and-im-proud","status":"publish","type":"post","link":"https:\/\/hellem.org\/wblog\/?p=3807","title":{"rendered":"I&#8217;m a nerd and I&#8217;m proud!!"},"content":{"rendered":"<p>Had a folder with about 350 property files, but with only 150 of them having a valid file name. No problem finding the files with a valid file name using find in combination with regex<\/p>\n<p><code>find . -regex '.*__.*properties'<\/code><\/p>\n<p>Problem is that I do not want to find the files with valid file names, I needed the ones with invalid names, but all the time regex is powerfull doing almost anything except excluding phrases and such (as I have read in various sources found by Google) I had to find a workaround.<\/p>\n<p>So here goes, all from the directory where the files are located<\/p>\n<ol>\n<li><strong>ls > allfiles.txt<\/strong> create a file with all filenames<\/li>\n<li><strong>perl -pi -e &#8216;s#.*__.*properties##g&#8217; allfiles.txt<\/strong> Remove all valid filenames<\/li>\n<li><strong> perl -pi -e &#8216;s#^\\n##g&#8217; allfiles.txt <\/strong> Turned out that I did not remove the newlines, so to get rid of all the blank lines I needed to issue this command as well.<\/li>\n<li><strong> for i in `cat allfiles.txt`; do svn delete $i; done <\/strong> This oneliner loops through the file, for each line delete the file from subversion (which deletes the file for me)<\/li>\n<\/ol>\n<p>Voila! Pleased with myself \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Had a folder with about 350 property files, but with only 150 of them having a valid file name. No problem finding the files with a valid file name using find in combination with regex find . -regex &#8216;.*__.*properties&#8217; Problem is that I do not want to find the files with valid file names, I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47],"tags":[],"class_list":["post-3807","post","type-post","status-publish","format-standard","hentry","category-work-geek"],"_links":{"self":[{"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=\/wp\/v2\/posts\/3807","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3807"}],"version-history":[{"count":1,"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=\/wp\/v2\/posts\/3807\/revisions"}],"predecessor-version":[{"id":13807,"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=\/wp\/v2\/posts\/3807\/revisions\/13807"}],"wp:attachment":[{"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hellem.org\/wblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}