请参阅在线Json的更改日志



我有一个json在线(6.5m),有近10000个地理点。我正在找一些东西来检查更改。每天增加近60分。

我发现:tail-f相当于一个URL

但当我尝试使用给定的命令时,我的debian出现了bash错误。

最后,我想格式化它们,并将它们发送到irc频道。

我会在本地保护JSON文件并对其进行区分。

#!/bin/sh
# filename for current version of JSON file
d=$(date +"%Y%m%d-%H%M%S")
current=data-$d.json # => data-20131129-123856.json
# download current version of JSON file
wget --quiet -O $current http://www.lhorn.de/~lutz/so/data.json
# determine the previous version of the JSON file (the second to last)
previous=$(find . -name "data-*.json" | sort | tail -2 | head -1)
# diff the previous and the current version of the JSON file
diff -u $previous $current

最新更新