File tree 1 file changed +11
-2
lines changed 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 4
4
# looking for csv files in this dir
5
5
FILES_TO_IMPORT_DIR=" /mnt/nas/work/ontime"
6
6
7
- # limit import to this number of files
7
+ # how many files to skip from the beginning of the list
8
+ FILES_TO_SKIP_NUM=0
9
+
10
+ # how many files to import
8
11
FILES_TO_IMPORT_NUM=3
9
12
13
+ # which file would be the first to import
14
+ FILE_TO_START_IMPORT_FROM=$(( FILES_TO_SKIP_NUM+ 1 ))
15
+
10
16
i=1
11
- for file in $( ls " $FILES_TO_IMPORT_DIR " /* .csv| sort| head -n $FILES_TO_IMPORT_NUM ) ; do
17
+ for file in $( ls " $FILES_TO_IMPORT_DIR " /* .csv| sort| tail -n + " $FILE_TO_START_IMPORT_FROM " | head -n " $FILES_TO_IMPORT_NUM " ) ; do
12
18
echo " $i . Prepare. Make link to $file "
13
19
rm -f ontime
14
20
ln -s $file ontime
@@ -22,6 +28,9 @@ for file in $(ls "$FILES_TO_IMPORT_DIR"/*.csv|sort|head -n $FILES_TO_IMPORT_NUM)
22
28
-u root \
23
29
airline ontime
24
30
31
+ # --local reads files locally on the client host, bot on the server
32
+ # --lock-tables Lock all tables for writing before processing any text files. This ensures that all tables are synchronized on the server.
33
+
25
34
echo " $i . Cleanup. $file "
26
35
rm -f ontime
27
36
You can’t perform that action at this time.
0 commit comments