diff options
Diffstat (limited to '.scripts/order')
-rw-r--r-- | .scripts/order | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.scripts/order b/.scripts/order new file mode 100644 index 0000000..155e039 --- /dev/null +++ b/.scripts/order @@ -0,0 +1,14 @@ +#!/bin/sh + +noofdirs=$(find . -mindepth 1 -maxdepth 1 -type d | wc -l) +lenofnod=$(echo -n "$noofdirs" | wc -m) ## Flag n to prevent newline count + +for f in * ; +do mv -n "$f" "$(date -r "$f" +"%Y%m%d_%H%M%S")_$f"; +done + +#open in vimv +#let @a=1 | g/^.\{0,16}/s//\=i.'.' | let i=i+1 +#add zeroes in front if lenofnod = 1 +#add zeroes in front if lenofnod = 2 + |