{"id":798,"date":"2023-11-28T14:50:13","date_gmt":"2023-11-28T05:50:13","guid":{"rendered":"https:\/\/www.aqua-informatics.jp\/?p=798"},"modified":"2023-12-01T06:45:39","modified_gmt":"2023-11-30T21:45:39","slug":"%e6%97%a5%e6%af%8e%e3%81%ae%e5%8b%95%e7%94%bb%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%82%92%e7%b5%90%e5%90%88%e3%81%97%e3%81%a6%e3%80%81%e5%bd%93%e6%9c%88%e5%88%86%e3%81%ae%e5%8b%95%e7%94%bb%e3%83%95","status":"publish","type":"post","link":"https:\/\/www.aqua-informatics.jp\/?p=798","title":{"rendered":"\u65e5\u6bce\u306e\u52d5\u753b\u30d5\u30a1\u30a4\u30eb\u3092\u7d50\u5408\u3057\u3066\u3001\u5f53\u6708\u5206\u306e\u52d5\u753b\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8"},"content":{"rendered":"\n<p>\u6708\u672b\u304c\u8fd1\u3065\u3044\u3066\u304d\u305f\u306e\u3067\u3001<a href=\"https:\/\/www.aqua-informatics.jp\/?p=672\">\u3053\u306e\u554f\u984c<\/a>\u3092\u89e3\u6c7a\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u305f\u3002<br>\u3053\u308c\u306b\u3088\u308a\u3001\u6708\u521d\u306b\u5148\u6708\u5206\u306e\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u3092\u51e6\u7406\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u65e5\u6bce\u306e\u52d5\u753b\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u5148\u6708\u52d5\u753b\u30d5\u30a1\u30a4\u30eb\u304c\u751f\u6210\u3055\u308c\u308b\u3002<br>\u3082\u3061\u308d\u3093\u3001\u65e5\u6bce\u306b\u524d\u65e5\u306e\u52d5\u753b\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u524d\u63d0\u3067\u3042\u308b\u3002\u3053\u308c\u3092\u5b9f\u73fe\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u968f\u5206\u524d\u304b\u3089\u7a3c\u50cd\u3055\u305b\u3066\u3044\u308b\u306e\u3067\u554f\u984c\u306a\u3044\u3068\u601d\u3046\u3002<br>cron\u306b\u767b\u9332\u3059\u308b\u969b\u306e\u6ce8\u610f\u70b9\u3068\u3057\u3066\u3001\u6708\u672b\u65e5\u306e\u65e5\u6bce\u306e\u52d5\u753b\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u3066\u304b\u3089\u3001\u4e0b\u8a18\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3055\u305b\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3001ChatGPT\u306b\u6dfb\u524a\u3057\u3066\u3082\u3089\u3063\u305f\u3002<\/p>\n\n\n\n<p>&lt;\u8ffd\u8a18&gt;<br>ChatGPT\u304c\u4fee\u6b63\u3057\u305f\u3068\u3053\u308d\u306f\u3001|| exit 1\u3068\u6587\u5b57\u5217\u3092\u5909\u6570\u306b\u4ee3\u5165\u3057\u3066\u7528\u3044\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u308c\u305f\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>#!\/bin\/bash                                                                                                                         \n\n# \u30d9\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\nbase_dir=&quot;\/home\/kimi\/Pictures\/rasp_zero_zeta&quot;\n\n# \u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u6307\u5b9a\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u5909\u66f4\ncd &quot;$base_dir&quot; || exit 1\n\n# \u5148\u6708\u306e\u5e74\u3068\u5e74\u6708\u3092\u53d6\u5f97\nlast_month=$(date -d &#39;last month&#39; &#39;+%Y-%m&#39;)\nYear=$(date -d &quot;$last_month-01&quot; &#39;+%Y&#39;)\nYM=$(date -d &quot;$last_month-01&quot; &#39;+%Y%m&#39;)\n\n# \u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u5148\u6708\u306e\u5e74\u306b\u5909\u66f4\ncd &quot;$Year&quot; || exit 1\n\n# Trash\u30d5\u30a9\u30eb\u30c0\u304c\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306f\u4f5c\u6210\ntrash_folder=&quot;Trash&quot;\nif [ ! -d &quot;$trash_folder&quot; ]; then\n  mkdir &quot;$trash_folder&quot;\nfi\n\n# \u65e5\u6bce\u306e\u52d5\u753b\u306e\u30ea\u30b9\u30c8\u3092\u4f5c\u6210\nvideo_list=&quot;video_list.txt&quot;\nls &quot;$YM*.mp4&quot; | awk &#39;{printf &quot;file %s\\n&quot;, $0}&#39; &gt; &quot;$video_list&quot;\n\n# \u753b\u50cf\u3092\u52d5\u753b\u306b\u5909\u63db\noutput_file=&quot;${YM}_zero_zeta.mp4&quot;\nffmpeg -f concat -i &quot;$video_list&quot; -c copy &quot;$output_file&quot;\n\n# \u65e5\u6bce\u306e\u52d5\u753b\u3092\u524a\u9664\u7528\u30d5\u30a9\u30eb\u30c0\u306b\u79fb\u52d5\nmv &quot;$YM*.mp4&quot; &quot;.\/$trash_folder&quot;\n\n# \u30c6\u30f3\u30dd\u30e9\u30ea\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\nrm &quot;$video_list&quot;<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6708\u672b\u304c\u8fd1\u3065\u3044\u3066\u304d\u305f\u306e\u3067\u3001\u3053\u306e\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u6708\u521d\u306b\u5148\u6708\u5206\u306e\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u3092\u51e6\u7406\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u65e5\u6bce\u306e\u52d5\u753b\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u5148\u6708\u52d5\u753b\u30d5\u30a1\u30a4\u30eb\u304c\u751f\u6210\u3055\u308c\u308b\u3002\u3082\u3061\u308d\u3093\u3001\u65e5\u6bce\u306b\u524d\u65e5\u306e\u52d5\u753b\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":92,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"common","vkexunit_cta_each_option":"","_lightning_design_setting":{"layout":"default"},"footnotes":""},"categories":[7],"tags":[],"class_list":["post-798","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=\/wp\/v2\/posts\/798","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=798"}],"version-history":[{"count":6,"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=\/wp\/v2\/posts\/798\/revisions"}],"predecessor-version":[{"id":807,"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=\/wp\/v2\/posts\/798\/revisions\/807"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=\/wp\/v2\/media\/92"}],"wp:attachment":[{"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aqua-informatics.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}