summaryrefslogtreecommitdiff
path: root/sortbucketed.sh
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-02-25 17:19:48 +0000
committerNick White <git@njw.name>2019-02-25 17:19:48 +0000
commit0aec35a060a9f9e1e33c18bf0e2af2aafd6a6257 (patch)
tree06681e52bf515814728e87c3971b50b178d9b480 /sortbucketed.sh
Add various helper scripts
Diffstat (limited to 'sortbucketed.sh')
-rw-r--r--sortbucketed.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/sortbucketed.sh b/sortbucketed.sh
new file mode 100644
index 0000000..ba3fbb4
--- /dev/null
+++ b/sortbucketed.sh
@@ -0,0 +1,3 @@
+# as filenames aren't necessarily the same length, pad them all to be so (bearing in mind it's right padding, as it's implied that it's 0.x)
+
+ls *png|sed 's/.png//g'|awk -F _ '{p = $3; while(length(p) < 18) {p = p "0"} ; printf("%s %s.png\n", p, $0)}'|sort -n|less