Code Snippets

#!/usr/bin/env bash
set -euo pipefail

response=$(curl -fsSL https://api.github.com/repos/torvalds/linux)
stars=$(printf '%s' "$response" | jq -r '.stargazers_count')

printf 'stars: %s\n' "$stars"