{"id":334,"date":"2021-11-18T14:34:19","date_gmt":"2021-11-18T05:34:19","guid":{"rendered":"https:\/\/www.worldagency.jp\/wordpress\/?p=334"},"modified":"2021-11-18T14:35:16","modified_gmt":"2021-11-18T05:35:16","slug":"bash%ef%bc%9a-%e3%83%86%e3%82%ad%e3%82%b9%e3%83%88%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%81%ae%e8%aa%ad%e8%be%bc%e3%81%a8%e6%96%87%e5%ad%97%e5%a4%89%e6%8f%9b%e4%b8%80%e6%8b%ac%e5%87%a6%e7%90%86","status":"publish","type":"post","link":"https:\/\/www.worldagency.jp\/wordpress\/?p=334","title":{"rendered":"BASH\uff1a \u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u8fbc\u3068\u6587\u5b57\u5909\u63db\u4e00\u62ec\u51e6\u7406"},"content":{"rendered":"\n\u6587\u5b57\u8d77\u3053\u3057\u30c4\u30fc\u30eb\u306e\u30c6\u30ad\u30b9\u30c8\u304c\u30011\u884c\u3067\u4f5c\u6210\u3055\u308c\u3066\u3044\u305f\u308a\u3001\u300c\u3048\u30fc\u300d\u300c\u3042\u306e\u30fc\u300d\u306a\u3069\u3092\u524a\u9664\u3059\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u70ba\u3001BASH\u3067 \u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u8fbc\u3068\u6587\u5b57\u5909\u63db\u4e00\u62ec\u51e6\u7406\u3092\u5b9f\u65bd\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\n\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n\n\n<h2 class=\"wp-block-heading\"> stringBatchReplaace.sh <\/h2>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash \n# stringBatchReplaace.sh\n\n# \u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u5b9a\u7fa9    \nDIR=.\/\n\n# \u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e.txt\u30d5\u30a1\u30a4\u30eb\u306b\u5bfe\u3057\u3066\u3001\u6587\u5b57\u4e00\u62ec\u5909\u63db\u51e6\u7406\u5f8c\u3001*_edited.txt\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u4fdd\u5b58\nfor pathfile in $DIR\/*.txt; do\n\n    echo $pathfile\n    edit=${pathfile%.*}_edited.txt\n    cp -f $pathfile $edit\n\n    echo \"\u3002\u306e\u5f8c\u306b\u6539\u884c\u30b3\u30fc\u30c9\u3092\u633f\u5165\"\n    sed -i -e 's\/\u3002\/\u3002\\r\\n\/g' $edit\n\n    echo \"\u3042\u306e\u30fc\u3092\u524a\u9664\"\n    sed -i -e 's\/\u3042\u306e\u30fc\/\/g' $edit\n\n    echo \"\u3048\u3063\u3068\u3092\u524a\u9664\"\n    sed -i -e 's\/\u3048\u3063\u3068\/\/g' $edit\n\n    echo \"\u3048\u30fc\u3068\u3092\u524a\u9664\"\n    sed -i -e 's\/\u3048\u30fc\u3068\/\/g' $edit\n\n    echo \"\u3048\u30fc\u3092\u524a\u9664\"\n    sed -i -e 's\/\u3048\u30fc\/\/g' $edit\n\ndone\nexit<\/code><\/pre>\n\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u5b57\u8d77\u3053\u3057\u30c4\u30fc\u30eb\u306e\u30c6\u30ad\u30b9\u30c8\u304c\u30011\u884c\u3067\u4f5c\u6210\u3055\u308c\u3066\u3044\u305f\u308a\u3001\u300c\u3048\u30fc\u300d\u300c\u3042\u306e\u30fc\u300d\u306a\u3069\u3092\u524a\u9664\u3059\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u70ba\u3001BASH\u3067 \u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u8fbc\u3068\u6587\u5b57\u5909\u63db\u4e00\u62ec\u51e6\u7406\u3092\u5b9f\u65bd\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210 stringBatchReplaace &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.worldagency.jp\/wordpress\/?p=334\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;BASH\uff1a \u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u8fbc\u3068\u6587\u5b57\u5909\u63db\u4e00\u62ec\u51e6\u7406&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":2,"featured_media":335,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57,5],"tags":[],"class_list":["post-334","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bash","category-linux"],"_links":{"self":[{"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/334","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=334"}],"version-history":[{"count":2,"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/334\/revisions"}],"predecessor-version":[{"id":337,"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/334\/revisions\/337"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/335"}],"wp:attachment":[{"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.worldagency.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}