Q:

Modifying sed statement?

I've got the following sed statement I am trying to modify to add in the modified string. The $DIRCONTENT is:
{"hash": "79e7b189ab3985f4bf753ba706da07ed", "thumb_exists": false, "bytes": 0, "path": "/", "is_dir": true, "size": "0 bytes", "root": "app_folder", "contents": [{"revision": 135, "rev": "8714372dc4", "thumb_exists": false, "bytes": 0, "modified": "Fri, 25 Oct 2013 00:05:18 +0000", "path": "/home", "is_dir": true, "icon": "folder", "root": "dropbox", "size": "0 bytes"}, {"revision": 1, "rev": "114372dc4", "thumb_exists": false, "bytes": 1223, "modified": "Mon, 16 Sep 2013 21:00:23 +0000", "client_mtime": "Mon, 16 Sep 2013 21:00:23 +0000", "path": "/serial.c", "is_dir": false, "icon": "page_white_code", "root": "dropbox", "mime_type": "text/x-csrc", "size": "1.2 KB"}], "icon": "folder"}

The sed statement is 
echo "$DIR_CONTENT" | sed 's/\\"/\\u0022/' | sed -n 's/.*"bytes": *\([0-9]*\),.*"path": *"\([^"]*\)",.*"is_dir": *\([^"]*\),.*/\2:\3;\1/p'

which returns 
/home:true;0
/serial.c:false;1223

I would like to add in the "modified" field so it then returns 
/home:true;0;Fri, 25 Oct 2013 00:05:18 +0000
/serial.c:false;1223;Mon, 16 Sep 2013 21:00:23 +0000

A:

Try this sed command:
$ echo "$DIR_CONTENT" | sed 's/\\"/\\u0022/' | sed -n 's/.*"bytes": *\([0-9]*\),.*"modified": *"\([^"]*\).*"path": *"\([^"]*\)",.*"is_dir": *\([^"]*\),.*/\3:\4;\1;\2/p'
/serial.c:false;1223;Mon, 16 Sep 2013 21:00:23 +0000

