SITKA Public Git
/
sitka
/
sitka-tools.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Fix hostname.
[sitka/sitka-tools.git]
/
marc_export_custom
/
fetch-shortcodes.sh
1
#!/bin/bash
2
psql -Upostgres -U evergreen evergreen -h db1.sitka.bclibraries.ca -o shortcodes.csv \
3
-c "COPY (
4
SELECT
5
a.shortname,a.name,b.shortname AS parent
6
FROM actor.org_unit a
7
JOIN actor.org_unit b
8
ON (a.parent_ou = b.id)
9
ORDER BY shortname
10
) TO STDOUT WITH CSV HEADER QUOTE AS '\"' FORCE QUOTE shortname, name, parent;"
11