-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsiri.sh
More file actions
executable file
·77 lines (73 loc) · 1.61 KB
/
siri.sh
File metadata and controls
executable file
·77 lines (73 loc) · 1.61 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/sh
reportTime(){
line=`date +%R`
mplayer "http://tts.baidu.com/text2audio?lan=zh&pid=101&ie=UTF-8&text=现在时间是$line&spd=3"
}
createTodayDictory(){
mkdir $(date "+%Y-%m-%d")
}
changeDtoHome(){
cd ~
crtdd="$( pwd )"
echo $crtdd
}
listFileAll(){
ls -l -a
}
findDictory(){
echo "please input the dictory end prinf where is it"
read dictoryName
test="$(find /home -type d -name $dictoryName)"
echo $test
cd $test
}
readFile(){
clear
echo "please input which file name what's content you want to see it"
read fileNmae
theFile="$(find /home -type f -name $fileNmae)"
echo "-------------------------------------------------------"
echo "your file's location"
echo $theFile
echo "-------------------------------------------------------"
echo "The content is as follows"
cat $theFile
}
cleanFile(){
clear
echo "please input which file or dictory do you want to delete"
read garbageFile
sudo rm -r $garbageFile
}
SpeedNote(){
clear
echo "please input the file name and what do you want to memory"
echo "input your file name"
read notefile
echo "please input your content"
cat >$notefile
}
musicPlayer(){
mplayer /home/csie/music/* -shuffle
}
echo "0) answer now time"
echo "1) create today worl dictory"
echo "2) changeDtoHome"
echo "3) listFileAll"
echo "4) findDictory"
echo "5) readFile"
echo "6) cleanFIle"
echo "7) SpeedNote"
echo "8) musicPlayer"
read OP
case $OP in
0) reportTime;;
1) createTodayDictory;;
2) changeDtoHome;;
3) listFileAll;;
4) findDictory;;
5) readFile;;
6) cleanFile;;
7) SpeedNote;;
8) musicPlayer;;
esac