added collate same as barcode in items
[koha-dla] / dla-import.sh
1 #!/bin/sh -xe
2
3 ls /mnt/share/DLA/inventura/*/*-*/upload/inv/*.pdX | while read path ; do
4         echo "# $path"
5         source_id=$(echo $path | cut -d/ -f6)
6         date_scanned=$(echo $path | cut -d/ -f7)
7         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/"
8 done