From 9db2cf0b44ff92a103ddaefd57d26596fea88ecd Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 1 May 2020 01:17:12 -0400 Subject: [PATCH] start work on loop --- pg_push.sh | 2 +- push_all.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 push_all.sh diff --git a/pg_push.sh b/pg_push.sh index 0ff7ba9..a7ce527 100644 --- a/pg_push.sh +++ b/pg_push.sh @@ -1,2 +1,2 @@ $PG -c "DELETE FROM import.targ_rev;" -$PG -c "\copy import.targ_rev FROM //mnt/c/Users/PTrowbridge/Downloads/001_XNS0T1G3_TRG.csv WITH CSV HEADER DELIMITER ',';" +$PG -c "\copy import.targ_rev FROM //mnt/c/Users/PTrowbridge/Downloads/004_XNT0TQT3_TRG.csv WITH CSV HEADER DELIMITER ',';" diff --git a/push_all.sh b/push_all.sh new file mode 100644 index 0000000..ddea33c --- /dev/null +++ b/push_all.sh @@ -0,0 +1,9 @@ +#!/bin/bash +getlist() { + find . -iname "*.csv" | while read f + do + printf $f + done +} + +getlist