Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save thomasgroch/d250866fd25f20be511eb515058f962f to your computer and use it in GitHub Desktop.

Select an option

Save thomasgroch/d250866fd25f20be511eb515058f962f to your computer and use it in GitHub Desktop.
els=($(curl -s 'https://jsonplaceholder.typicode.com/photos' | jq '.[] | select(.url|test("^(https)://")) | .url')); selected=${els[$RANDOM % ${#els[@]} ]}; selected="${selected%\"}"; selected="${selected#\"}"; echo $selected | pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment