Old high school files. Lessson notes/codes/projects etc.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/usr/bin/bash
|
|
|
|
if [ -z $1 ]; then
|
|
echo "Usage: get_words.sh (output file)"
|
|
exit
|
|
fi
|
|
|
|
api_url=https://random-word-api.herokuapp.com/all
|
|
|
|
words=$(curl -s $api_url | sed 's/\",\"/\ /g' | sed 's/\"\]//g' | sed 's/\[\"//g')
|
|
|
|
echo $words > $1
|
|
|