summaryrefslogtreecommitdiff
path: root/.scripts/order
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-07-05 11:21:50 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-07-05 11:21:50 +0530
commitf9b57f6ae4dd8e70f8f5096e1f51dfd2ff1d807b (patch)
treeddd3421c8d8f5ab0839f0a51069a83df58a99c9a /.scripts/order
parent7d36763d99e86e238e27dd463358cbd95a90a932 (diff)
using gnuutil nl instead of sed
Diffstat (limited to '.scripts/order')
-rw-r--r--.scripts/order9
1 files changed, 1 insertions, 8 deletions
diff --git a/.scripts/order b/.scripts/order
index 4d6dd48..1b6eff5 100644
--- a/.scripts/order
+++ b/.scripts/order
@@ -13,12 +13,5 @@ done
i=1;
for d in * ;
-do mv -n "$d" "$(ls | sed '=' | sed 'N;s/\n/. /' | awk -v i=$i 'NR==i')" && i=$((i+1));
+do echo $d $i ; mv -n "$d" "$(ls | nl -w$lenofnod -s ". " -n rz | awk -v i=$i 'NR==i')" ; i=$((i+1));
done
-
-
-#add zeroes in front if lenofnod = 1
-
-#for f in *
-#do rename
-