{"id":34,"date":"2016-09-27T09:18:16","date_gmt":"2016-09-27T00:18:16","guid":{"rendered":"http:\/\/okamurax.com\/?p=34"},"modified":"2016-12-23T10:15:37","modified_gmt":"2016-12-23T01:15:37","slug":"c-%e6%8c%87%e5%ae%9a%e3%83%95%e3%82%a9%e3%83%ab%e3%83%80%e4%bb%a5%e4%b8%8b%e3%81%ae%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%8b%e3%82%89%e7%89%b9%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/appbay.org\/?p=34","title":{"rendered":"C# \u6307\u5b9a\u30d5\u30a9\u30eb\u30c0\u4ee5\u4e0b\u306e\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u7279\u5b9a\u306e\u884c\u3092\u629c\u304d\u51fa\u3059"},"content":{"rendered":"<p>\u3053\u3053\u3067\u306fDropbox\u306e\u7279\u5b9a\u306e\u30d5\u30a9\u30eb\u30c0\u4ee5\u4e0b\u306b\u3042\u308b\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u2605\u306e\u3042\u308b\u884c\u3092\u63a2\u3057\u3066\u3044\u308b\u3002<br \/>\nVS\u3092\u4f7f\u308f\u305a\u306b\u76f4\u63a5CSC.exe\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"lang:c# decode:true \">using System;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.IO;\r\n\r\nnamespace Application\r\n{\r\n    class Program\r\n    {\r\n        static void Main(string[] args)\r\n        {\r\n            int k = 1;\r\n            string[] ary = new string[256];\r\n            var e = Encoding.GetEncoding(\"shift_jis\");\r\n            foreach(var f in Directory.GetFiles(@\"D:\\Dropbox\\My Cloud Work\\Text\\Project\", \"*.txt\", SearchOption.AllDirectories))\r\n            {\r\n                var grep = File.ReadAllLines(@f, e)\r\n                .Select((s, i) =&gt; new { Index = i, Value = s })\r\n                .Where(s =&gt; s.Value.Contains(\"\u2605\"));\r\n                foreach (var g in grep)\r\n                {\r\n                    ary[k] = f;\r\n                    Console.WriteLine(k + \" \" + Path.GetFileNameWithoutExtension(f) + \" {0}:{1}\\n\", g.Index, g.Value);\r\n                    k++;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p>PowerShell\u3067\u3084\u3063\u3066\u307f\u308b\u3068\u3002<\/p>\n<pre class=\"lang:ps decode:true \">Get-ChildItem -include *.txt -Path 'D:\\Dropbox\\My Cloud Work\\Text\\Project' -Recurse  | Select-String -Pattern \"\u2605.*\" -encoding default | % { $_ | select-object matches ; $_ | select-object path | split-path -Leaf ; \"`n\" } \r\nread-host<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3053\u3067\u306fDropbox\u306e\u7279\u5b9a\u306e\u30d5\u30a9\u30eb\u30c0\u4ee5\u4e0b\u306b\u3042\u308b\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u2605\u306e\u3042\u308b\u884c\u3092\u63a2\u3057\u3066\u3044\u308b\u3002 VS\u3092\u4f7f\u308f\u305a\u306b\u76f4\u63a5CSC.exe\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u3044\u308b\u3002 &nbsp; using System; using System.L &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/appbay.org\/?p=34\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;C# \u6307\u5b9a\u30d5\u30a9\u30eb\u30c0\u4ee5\u4e0b\u306e\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u7279\u5b9a\u306e\u884c\u3092\u629c\u304d\u51fa\u3059&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9],"class_list":["post-34","post","type-post","status-publish","format-standard","hentry","category-1","tag-c-net"],"_links":{"self":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/34","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=34"}],"version-history":[{"count":4,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/34\/revisions"}],"predecessor-version":[{"id":38,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/34\/revisions\/38"}],"wp:attachment":[{"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}