projects
/
koha-dla
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
673f9ae
)
original dla import which produce tab-delmited output
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 5 Oct 2018 14:33:03 +0000
(16:33 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 5 Oct 2018 14:33:03 +0000
(16:33 +0200)
for some reason, this ls doesn't have permission on koha-dev to execute
dla-import.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/dla-import.sh
b/dla-import.sh
new file mode 100755
(executable)
index 0000000..
11b0b61
--- /dev/null
+++ b/
dla-import.sh
@@ -0,0
+1,8
@@
+#!/bin/sh -xe
+
+ls /mnt/share/DLA/inventura/*/*-*/upload/inv/*.pdX | while read path ; do
+ echo "# $path"
+ source_id=$(echo $path | cut -d/ -f6)
+ date_scanned=$(echo $path | cut -d/ -f7)
+ strings $path | grep '130[0-9][0-9][0-9][0-9][0-9][0-9][0-9]' | sed -e 's/^.*\(130[0-9][0-9][0-9][0-9][0-9][0-9][0-9]\).*$/\1/' -e "s/^/$date_scanned\t$source_id\t/"
+done