forked from patilswapnil/shell_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mac_application_close_using_terminal
67 lines (65 loc) · 1.24 KB
/
mac_application_close_using_terminal
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
sett="setting"
saf="safari"
chor="chrome"
fire="firefox"
sky="skype"
sub="sublime"
ato="atom"
slk="slack"
nt="note"
cale="cal"
ca="calu"
ex="excel"
sq="sql"
mis="dash"
txt="text"
if [ "$1" == "$sett" ]
then
osascript -e 'quit app "system preferences"'
elif [ "$1" == "$saf" ]
then
osascript -e 'quit app "safari"'
elif [ "$1" == "$chor" ]
then
osascript -e 'quit app "google chrome"'
elif [ "$1" == "$fire" ]
then
osascript -e 'quit app "firefox"'
elif [ "$1" == "$sky" ]
then
open -a skype
osascript -e 'quit app "skype"'
elif [ "$1" == "$sub" ]
then
osascript -e 'quit app "sublime text"'
elif [ "$1" == "$ato" ]
then
osascript -e 'quit app "atom"'
elif [ "$1" == "$slk" ]
then
osascript -e 'quit app "slack"'
elif [ "$1" == "$nt" ]
then
osascript -e 'quit app "notes"'
elif [ "$1" == "$cale" ]
then
osascript -e 'quit app "calendar"'
elif [ "$1" == "$ca" ]
then
osascript -e 'quit app "calculator"'
elif [ "$1" == "$ex" ]
then
osascript -e 'quit app "microsoft excel"'
elif [ "$1" == "$sq" ]
then
osascript -e 'quit app "sql power architect jdbc"'
elif [ "$1" == "$mis" ]
then
osascript -e 'quit app "dashboard"'
elif [ "$1" == "$txt" ]
then
osascript -e 'quit app "textedit"'
else
echo "Keyword does not exit....!Check list"
fi