-
Notifications
You must be signed in to change notification settings - Fork 0
/
cropDat.sh
executable file
·50 lines (46 loc) · 908 Bytes
/
cropDat.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
# Automate cropping the TIDIGIT adults database to only contain single digits
for D in `find TIDIGIT/train/man/* -type d`
do
#echo $D
cd $D
for F in `find [1-9]?.wav`
do
#echo ${F:0:1}
cp $F ../../../../TIDIGIT_adults_crop/train/${F:0:1}/`basename $D`.wav
done
cd -
done
for D in `find TIDIGIT/train/woman/* -type d`
do
#echo $D
cd $D
for F in `find [1-9]?.wav`
do
#echo ${F:0:1}
cp $F ../../../../TIDIGIT_adults_crop/train/${F:0:1}/`basename $D`.wav
done
cd -
done
for D in `find TIDIGIT/test/man/* -type d`
do
#echo $D
cd $D
for F in `find [1-9]?.wav`
do
#echo ${F:0:1}
cp $F ../../../../TIDIGIT_adults_crop/test/${F:0:1}/`basename $D`.wav
done
cd -
done
for D in `find TIDIGIT/test/woman/* -type d`
do
#echo $D
cd $D
for F in `find [1-9]?.wav`
do
#echo ${F:0:1}
cp $F ../../../../TIDIGIT_adults_crop/test/${F:0:1}/`basename $D`.wav
done
cd -
done