From 353f2bc6d7d786b3ff8f638dfb6b8cf52a01b43d Mon Sep 17 00:00:00 2001 From: James Bunton Date: Mon, 23 Jul 2012 23:03:09 +1000 Subject: [PATCH] rename by date script --- scripts/rename_by_date | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 scripts/rename_by_date diff --git a/scripts/rename_by_date b/scripts/rename_by_date new file mode 100755 index 0000000..0dde55f --- /dev/null +++ b/scripts/rename_by_date @@ -0,0 +1,8 @@ +#!/bin/bash + +num=1 +ls -tr | while read f; do + mv "$f" "$num $f" + let "num=num+1" +done + -- 2.39.2