Parent Directory | Revision Log
beginning of stats reporter
1 | pipe=/tmp/strix-import |
2 | db=a3c |
3 | |
4 | if [ -z "$1" ] ; then |
5 | echo "Usage: $0 export.tsv" |
6 | exit |
7 | else |
8 | file=$1 |
9 | table="strix_`basename $file | sed 's/.tsv$//'`"; |
10 | fi |
11 | |
12 | mkfifo $pipe |
13 | |
14 | echo "** importing $table from $1" |
15 | |
16 | psql -c "delete from $table" $db |
17 | psql -c "\copy $table from '$pipe' with delimiter ' '" $db & |
18 | cat -n $file | sed 's/^ *//' > $pipe |
19 | psql -c "select count(*) from $table" $db |
Name | Value |
---|---|
svn:executable | * |
ViewVC Help | |
Powered by ViewVC 1.1.26 |