意外と知られていませんが、grepで部分一致検索ができます。
json文字列からURLを抜き出す場合などに便利。
-o, --only-matching
マッチする行のマッチした部分だけを (それが空文字列でなければ) 表示します。 マッチした各文字列は、それぞれ別の行に書き出します。
◆サンプル
ubuntu@ubuntu-virtual-machine:~/work/grep$ cat json.txt
{"image_urls":{"thumbnail":"http://abc.com/thumbnail.jpg","small":"http://abc.com/small.jpg"}}
ubuntu@ubuntu-virtual-machine:~/work/grep$ egrep -o "http[^\"]+" json.txt
http://abc.com/thumbnail.jpg
http://abc.com/small.jpg