$ cat ~/bin/jqmusic #!/usr/bin/env bash exec jq -e "${@:1:$(($#-2))}" "include \"music\"; ${@: -2:1}" "${@: -1}" >/dev/null 2>&1 $ cat ~/.jq/music.jq def year: .released | match("[0-9]{4}").string | tonumber; def has_genre(str): .genres.primary | any(. == str); def match_genre(regexp): .genres.primary | any(match(regexp));