Shell script error while renaming a large set of folders

Asked

Viewed 36 times

-4

People were making a script to rename several folders in bulk that contains tabs+spaces+dots+dashes and many other characters in the name for something like: name_myname_folder. I made a script using the for and it worked well so I decided to make another script using the while it is even renaming but I have to run the script according to the number of folders that need to be renamed it is not renaming everything from a single time what is the problem ai?

The script is this below: https://pastebin.com/FNJPeFgm

  • Code must be present in the question.

1 answer

0

You want to make this recursive?

If using the command: find . -maxdepth 2 -type d | sort | tac to list directories. The Sort and tac are to process in reverse order.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.