{"id":85,"date":"2013-12-13T08:02:59","date_gmt":"2013-12-13T08:02:59","guid":{"rendered":"http:\/\/tastaturkind.ch\/?p=85"},"modified":"2013-12-13T08:02:59","modified_gmt":"2013-12-13T08:02:59","slug":"move-folders-into-projectenvironment-subfolders","status":"publish","type":"post","link":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/2013\/12\/13\/move-folders-into-projectenvironment-subfolders\/","title":{"rendered":"Move folders into project\/environment subfolders"},"content":{"rendered":"<p><code>#!\/bin\/bash<br \/>\n# move folders into subfolders based on a value in a textfile inside the source folders<br \/>\nfor i in $(find . -maxdepth 1 -type d -name \"R??.*\")<br \/>\ndo<br \/>\necho $i<br \/>\nif test -f $i\/clarify.env ; then<br \/>\n  j=$(grep -o \"^db_name=.*\" $i\/clarify.env | cut -d \"=\" -f 2)<br \/>\n  test ! -d _$j && mkdir _$j<br \/>\n  if test $j -a -d _$j ; then<br \/>\n    echo moving $i into _$j<br \/>\n    mv -i $i _$j<br \/>\n  fi<br \/>\nfi<br \/>\ndone<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>#!\/bin\/bash # move folders into subfolders based on a value in a textfile inside the source folders for i in $(find . -maxdepth 1 -type d -name &#8222;R??.*&#8220;) do echo $i if test -f $i\/clarify.env ; then j=$(grep -o &#8222;^db_name=.*&#8220; &hellip; <a href=\"https:\/\/oliver-frick.ch\/wordpress\/index.php\/2013\/12\/13\/move-folders-into-projectenvironment-subfolders\/\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-85","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/85","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=85"}],"version-history":[{"count":0,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/85\/revisions"}],"wp:attachment":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=85"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=85"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}