{"id":407,"date":"2020-02-25T10:15:44","date_gmt":"2020-02-25T01:15:44","guid":{"rendered":"https:\/\/blog.hgrs.me\/?p=407"},"modified":"2020-02-24T03:19:18","modified_gmt":"2020-02-23T18:19:18","slug":"%e5%ae%9f%e8%a1%8c%e4%b8%ad%e3%81%ae%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%81%ae%e6%a8%99%e6%ba%96%e5%87%ba%e5%8a%9b%e3%82%92%e5%a4%89%e6%95%b0%e3%81%ab%e3%81%97%e3%81%a6%e5%88%a5%e3%82%b3%e3%83%9e","status":"publish","type":"post","link":"https:\/\/blog.hgrs.me\/archives\/407.html","title":{"rendered":"\u5b9f\u884c\u4e2d\u306e\u30b3\u30de\u30f3\u30c9\u306e\u6a19\u6e96\u51fa\u529b\u3092\u5909\u6570\u306b\u3057\u3066\u5225\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b"},"content":{"rendered":"
\u5b9f\u884c\u4e2d\u306e\u6a19\u6e96\u51fa\u529b\u3092\u53d7\u3051\u53d6\u3063\u3066\u3001\u4f55\u304b\u5225\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u3044\u3053\u3068\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u305d\u308c\u3092\u5b9f\u73fe\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n
\u5358\u7d14\u306b\u51fa\u529b\u3055\u308c\u308b\u5185\u5bb9\u3092\u5225\u30b3\u30de\u30f3\u30c9\u306b\u6e21\u3059\u306b\u306f\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3092\u4f7f\u7528\u3059\u308c\u3070\u7c21\u5358\u306b\u3067\u304d\u307e\u3059\u3002<\/p>\n
\u305f\u3060\u3001\u5c11\u3057\u8907\u96d1\u306a\u3053\u3068\u3092\u3084\u308d\u3046\u3068\u3059\u308b\u3068\u5c11\u3057\u81ea\u7531\u5ea6\u304c\u4f4e\u3044\u306e\u3067\u3001 \u4ee5\u4e0b\u3067\u306f\u51fa\u529b\u5185\u5bb9\u3092 \u4f8b\u3048\u3070\u5168\u304f\u610f\u5473\u306e\u306a\u3044\u3053\u3068\u3067\u3059\u304c \u3053\u308c\u3092\u4f7f\u3048\u3070\u3001\u4f8b\u3048\u3070 if\u6587\u3067\u4f55\u304b\u5206\u5c90\u3055\u305b\u305f\u308a\u306a\u3069\u8272\u3005\u3068\u5fdc\u7528\u304c\u52b9\u304d\u307e\u3059\u3002<\/p>\nwhile<\/code> \u3068
read<\/code> \u3092\u4f7f\u3063\u3066\u30b3\u30de\u30f3\u30c9\u3092\u81ea\u7531\u306b\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n
line<\/code> \u3068\u3044\u3046\u5909\u6570\u3068\u3057\u3066\u53d7\u3051\u53d6\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002<\/p>\n
<\u5b9f\u884c\u3057\u305f\u3044\u30b3\u30de\u30f3\u30c9> | while read -r line\ndo\n <\u51fa\u529b\u3092\u53d7\u3051\u53d6\u3063\u3066\u51e6\u7406\u3059\u308b\u30b3\u30de\u30f3\u30c9>\ndone;<\/code><\/pre>\n
ping<\/code> \u306e\u5b9f\u884c\u3092\u305d\u306e\u307e\u307e\u8868\u793a\u3059\u308b\u30b3\u30de\u30f3\u30c9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n
ping 127.0.0.1 | while read -r line\ndo\n echo $line\ndone;<\/code><\/pre>\n