3 ms·
(Assuming data has already been downloaded) cat data.json | grep -v 'null}' | sed -r 's/\"name\"\:\"([a-zA-Z.'\'' -]{2,50})\",.{80,200}\"creditcard\":\"([0-9-]
by raverbashing 12y ago
(Assuming data has already been downloaded)
cat data.json | grep -v 'null}' | sed -r 's/\"name\"\:\"([a-zA-Z.'\'' -]{2,50})\",.{80,200}\"creditcard\":\"([0-9-]{2,50})\"},?/\1,\2/' | tr -d '{}]['
(replace with sed -E on Mac OSX)
- greggyb 12y agoNo need to cat first. Command line utilities can act on files directly: grep -v 'null}' data.json | ....
- raverbashing 12y agoYes, it's just like this so you can take it and curl the url in place.