Last active
February 20, 2023 13:04
-
-
Save mcustiel/c464394397ffbb678ed2a4c636333912 to your computer and use it in GitHub Desktop.
Random chuck norris fact
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
api=https://api.chucknorris.io/jokes/random | |
contents=$(curl -s $api) | |
if [ "$(echo $contents | jq -r '.value')" != "" ] ; then | |
echo $(echo $contents | jq -r '.value') | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment