10月24日はローソンへGO!
英リバプール大学とオランダのマーストリヒト大学が行った研究で、適度にアルコールを摂取すると、外国語を話す能力が向上するとの研究成果を発表した
JSON の内容を sed や awk のようにフィルタ・加工するためのプログラムに jq がある。 JSON 形式で提供されている WebAPI の出力や、ログの内容を扱うのにとても便利。
curl -s 'http://api.openweathermap.org/data/2.5/weather?q=Tokyo,jp&lang=ja&units=metric&appid=573427e716823d5cca0f61187a019516' | jq { "coord": { "lon": 139.69, "lat": 35.69 }, "weather": [ { "id": 501, "main": "Rain", "description": "適度な雨", "icon": "10d" }, { "id": 701, "main": "Mist", "description": "霧", "icon": "50d" } ], "base": "stations", "main": { "temp": 12.57, "pressure": 1019, "humidity": 87, "temp_min": 12, "temp_max": 13 }, "visibility": 5000, "wind": { "speed": 7.2, "deg": 10 }, "clouds": { "all": 75 }, "dt": 1508900400, "sys": { "type": 1, "id": 7619, "message": 0.0073, "country": "JP", "sunrise": 1508878582, "sunset": 1508918024 }, "id": 1850147, "name": "Tokyo", "cod": 200 }
curl -s 'http://api.openweathermap.org/data/2.5/forecast?q=Tokyo,jp&lang=ja&units=metric&appid=573427e716823d5cca0f61187a019516' | jq { "cod": "200", "message": 0.0068, "cnt": 39, "list": [ { "dt": 1508932800, "main": { "temp": 14.28, "temp_min": 14.28, "temp_max": 14.28, "pressure": 1029.13, "sea_level": 1032.91, "grnd_level": 1029.13, "humidity": 100, "temp_kf": 0 }, "weather": [ { "id": 500, "main": "Rain", "description": "小雨", "icon": "10n" } ], "clouds": { "all": 76 }, "wind": { "speed": 7.02, "deg": 3.50217 }, "rain": { "3h": 0.28 }, "sys": { "pod": "n" }, "dt_txt": "2017-10-25 12:00:00" }, { "dt": 1508943600, "main": { "temp": 14.23, "temp_min": 14.23, "temp_max": 14.23, "pressure": 1028.58, "sea_level": 1032.33, "grnd_level": 1028.58, "humidity": 100, "temp_kf": 0 }, "weather": [ { "id": 800, "main": "Clear", "description": "晴天", "icon": "01n" } ], "clouds": { "all": 0 }, "wind": { "speed": 6.16, "deg": 21.5041 }, "rain": {}, "sys": { "pod": "n" }, "dt_txt": "2017-10-25 15:00:00" }, ...