티스토리 뷰

공부

[Sh] curl parse JSON String

seunggabi 승가비 2020. 4. 16. 00:45
curl -s 'https://api.github.com/users/lambda' | \
    python3 -c "import sys, json; print(json.load(sys.stdin)['name'])"

https://stackoverflow.com/questions/1955505/parsing-json-with-unix-tools

 

Parsing JSON with Unix tools

I'm trying to parse JSON returned from a curl request, like so: curl 'http://twitter.com/users/username.json' | sed -e 's/[{}]/''/g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<...

stackoverflow.com

 

'공부' 카테고리의 다른 글

[oozie] [yyyy-mm-dd't'hh:mm+0900] mask  (0) 2020.04.16
[JS] echartJS  (0) 2020.04.16
[Sh] curl parse JSON String  (0) 2020.04.16
[Sh] split string  (0) 2020.04.16
[Linux] mkdir + chmod 777 `mkdir -m 777 name`  (0) 2020.04.16
[Hadoop] WebHDFS REST API  (0) 2020.04.16
댓글
댓글쓰기 폼