Andrew's git
/
scripts.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
add pdf-mv.sh
author
Andrew Lorimer
<andrew@lorimer.id.au>
Fri, 2 Aug 2019 06:56:28 +0000
(16:56 +1000)
committer
Andrew Lorimer
<andrew@lorimer.id.au>
Fri, 2 Aug 2019 06:56:28 +0000
(16:56 +1000)
no idea what this was for, I don't even remember writing it
pdf-mv.sh
[new file with mode: 0755]
patch
|
blob
raw
|
patch
|
inline
| side by side (parent:
2c69d15
)
diff --git a/pdf-mv.sh
b/pdf-mv.sh
new file mode 100755
(executable)
index 0000000..
a552fe3
--- /dev/null
+++ b/
pdf-mv.sh
@@ -0,0
+1,6
@@
+#! /bin/bash
+
+for oldfile in "$@"; do
+ newname=$(pdfinfo -meta $oldfile | sed -n '/MT-.../p' | sed -n 's/.*\(MT-...\): \(.*\)<.*/\L\1-\2\.pdf/; s/ /-/gp')
+ mv $oldfile $newname
+done