-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathword_rolls_starter_script
More file actions
executable file
·48 lines (36 loc) · 1.24 KB
/
word_rolls_starter_script
File metadata and controls
executable file
·48 lines (36 loc) · 1.24 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
#############################
# Word Rolls Starter Script #
#############################
# making script executable
# https://stackoverflow.com/a/5126052
# https://stackoverflow.com/a/12276562
# infinite loop
# https://www.cyberciti.biz/faq/bash-infinite-loop/
while true
do
# take input
# https://stackoverflow.com/a/9720193
read -p "Enter a word: " word
# replace spaces with hyphens
# https://unix.stackexchange.com/a/212137
wordWithHyphens=${word// /-}
# lowercase
# https://stackoverflow.com/a/2264537
#word="${a,,}"
#echo $word
# sites
oxfordLink="https://en.oxforddictionaries.com/definition/$wordWithHyphens"
wordsInASentenceLink="https://wordsinasentence.com/$wordWithHyphens-in-a-sentence"
dictionaryLink="https://www.dictionary.com/browse/$wordWithHyphens"
creatorStudioLink="https://business.facebook.com/creatorstudio?tab=instagram_content_posts&mode=instagram&collection_id=all_pages&content_table=INSTAGRAM_PHOTO_POSTS"
# open in chrome
# https://superuser.com/a/1148415
open -a "Google Chrome" $oxfordLink $wordsInASentenceLink $dictionaryLink $creatorStudioLink
# open in dictionary
# https://apple.stackexchange.com/a/90044
open dict://"$word"
# open photoshop
open -a "Adobe Photoshop 2020"
done
# ~fin~ #