Andrew's git
/
scripts.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'master' of charles:/tank/andrew/code/scripts
author
Andrew Lorimer
<andrew@lorimer.id.au>
Tue, 19 Nov 2019 06:12:40 +0000
(17:12 +1100)
committer
Andrew Lorimer
<andrew@lorimer.id.au>
Tue, 19 Nov 2019 06:12:40 +0000
(17:12 +1100)
pdf-mv.sh
[new file with mode: 0755]
patch
|
blob
raw
(from parent 2:
d220e33
)
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