Skip to content

Instantly share code, notes, and snippets.

@marushu
Last active October 25, 2016 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marushu/37696dafc0105a0e2e0a06f2409db73c to your computer and use it in GitHub Desktop.
Save marushu/37696dafc0105a0e2e0a06f2409db73c to your computer and use it in GitHub Desktop.
jqで配列の数を取得
#!/bin/sh
# Count returned json array length.
# --graboff is for [] parameter.
curl --globoff https://private.hibou-web.com/wp-json/wp/v2/posts?filter[posts_per_page]=5 | jq length
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment