scripts

random scripts
git clone https://git.parazyd.org/scripts
Log | Files | Refs

xkcd (191B)


      1 #!/bin/sh
      2 
      3 tot="$(curl -s https://xkcd.com/info.0.json | jq '.num')"
      4 [ -n "$tot" ] || exit 1
      5 rnd="$(shuf -i 1-${tot} -n 1)"
      6 
      7 curl -s https://xkcd.com/$rnd/info.0.json | jq '.img' | xargs feh