-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopy_films
More file actions
27 lines (24 loc) · 811 Bytes
/
copy_films
File metadata and controls
27 lines (24 loc) · 811 Bytes
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
#!/bin/bash
if [ -z "$1" -o -z "$2" ]
then
echo "copy_films: Format isn't correct!"
echo "copy_films: Use copy_films list_of_films destination_path iconv"
echo "where list_of_films - text file with films list"
echo "where destination_path - destination folder"
echo "where iconv - if present then ist_of_films will be converted from CP1251 to UTF8"
echo "Converted images will stored in path_to_photos/converted"
exit
fi
if [ -z "$3"]
then
cat $1 | while read f
do
echo -en "\r$f"
cp -ru "$f" "$2"
done
else
cat $1 | iconv -f CP1251 -t UTF8 | while read f; do ls "$f"; cp -r "$f" "$2"; done
fi
#cat $1 | while read f; do iconv -f cp1251 < $f > ../converted/$f; done
#cat $1 | while read f; do ls "$f"; done
#cat $1 | while read f; do echo $f; done