-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit_captionFile_v2.sh
59 lines (48 loc) · 1.27 KB
/
init_captionFile_v2.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
51
52
53
54
55
56
57
#!/bin/bash
g_file='./gallery.html'
root_dir=Photo_Slideshow_Originals
final_dir=Photo_Slideshow
dir1=Research
dir2=Antarctic_1819
dir3=MtBaker
dir4=Antarctic_1415
watermark_flag=0
sizethresh=1000000
density=1000
# ------------------------------------------------------------------------------------------------
files=$(find ../"$final_dir"/"$dir1"/ -maxdepth 1 -name '*.[jJ][pP][gG]')
outfile=./"$final_dir"/CaptionInit_"$dir1".txt
echo "" > $outfile
for f in $files
do
f1 = ${awk -F "/" '{print $2} $f}
echo $f1 >> $outfile
done
echo "Completed $dir1"
files=$(find ../"$final_dir"/"$dir2"/ -maxdepth 1 -name '*.[jJ][pP][gG]')
outfile=./"$final_dir"/CaptionInit_"$dir2".txt
echo "" > $outfile
for f in $files
do
f1 = ${awk -F "/" '{print $2} $f}
echo $f1 >> $outfile
done
echo "Completed $dir2"
files=$(find ../"$final_dir"/"$dir3"/ -maxdepth 1 -name '*.[jJ][pP][gG]')
outfile=./"$final_dir"/CaptionInit_"$dir3".txt
echo "" > $outfile
for f in $files
do
f1 = ${awk -F "/" '{print $2} $f}
echo $f1 >> $outfile
done
echo "Completed $dir3"
files=$(find ../"$final_dir"/"$dir4"/ -maxdepth 1 -name '*.[jJ][pP][gG]')
outfile=./"$final_dir"/CaptionInit_"$dir4".txt
echo "" > $outfile
for f in $files
do
f1 = ${awk -F "/" '{print $2} $f}
echo $f1 >> $outfile
done
echo "Completed $dir4"