From f9b57f6ae4dd8e70f8f5096e1f51dfd2ff1d807b Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Tue, 5 Jul 2022 11:21:50 +0530 Subject: using gnuutil nl instead of sed --- .scripts/order | 9 +-------- 1 file changed, 1 insertion(+), 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 - -- cgit v1.2.3