-
Notifications
You must be signed in to change notification settings - Fork 0
/
trainguy_init.sh
executable file
·26 lines (26 loc) · 1.11 KB
/
trainguy_init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function checkandadd() {
word="$1"
shift
file="$1"
grep "^$word\$" "$file" > /dev/null || { echo "$word" >> "$file" && echo "Added $word to $file."; }
}
curl -O https://raw.githubusercontent.com/skjorrface/animals.txt/master/animals.txt
checkandadd "Pug" "animals.txt"
checkandadd "Pigeon" "animals.txt"
checkandadd "Herring" "animals.txt"
checkandadd "Cockerel" "animals.txt"
checkandadd "Trout" "animals.txt"
checkandadd "Spaniel" "animals.txt"
checkandadd "Chipmunk" "animals.txt"
checkandadd "Halibut" "animals.txt"
checkandadd "Option" "animals.txt"
curl -O https://gist.githubusercontent.com/hugsy/8910dc78d208e40de42deb29e62df913/raw/eec99c5597a73f6a9240cab26965a8609fa0f6ea/english-adjectives.txt
checkandadd "abandoned" "english-adjectives.txt"
checkandadd "disgruntled" "english-adjectives.txt"
checkandadd "vigorous" "english-adjectives.txt"
checkandadd "male" "english-adjectives.txt"
checkandadd "Edwardian" "english-adjectives.txt"
checkandadd "idle" "english-adjectives.txt"
checkandadd "buttery" "english-adjectives.txt"
checkandadd "bulky" "english-adjectives.txt"
checkandadd "viable" "english-adjectives.txt"