2020-05-01 01:17:12 -04:00
|
|
|
#!/bin/bash
|
|
|
|
getlist() {
|
2020-05-01 01:58:41 -04:00
|
|
|
find . -iname "*.csv" | while read f
|
2020-05-01 01:17:12 -04:00
|
|
|
do
|
2020-05-01 01:34:44 -04:00
|
|
|
$PG -c "\copy import.targ_rev FROM $f WITH CSV HEADER DELIMITER ',';"
|
2020-05-01 01:17:12 -04:00
|
|
|
done
|
|
|
|
}
|
2020-05-01 16:02:49 -04:00
|
|
|
$PG -c "DELETE FROM import.targ_rev;"
|
2020-05-01 01:17:12 -04:00
|
|
|
getlist
|