Article 59QZV make bash script recursive in current directory

make bash script recursive in current directory

by
lleb
from LinuxQuestions.org on (#59QZV)
what do i need to add to the following code

Code:#!/bin/bash

#for i in ./*old_string*; do mv -- "$i" "${i//old_string/new_string_here}"; done

for i in ./*\ -\ *; do mv -- "$i" "${i//\ -\ /-}"; done

for i in ./*\ *; do mv -- "$i" "${i//\ /.}"; done

for i in ./*\ \(*; do mv -- "$i" "${i//\ \(/}"; done

for i in ./*\(*; do mv -- "$i" "${i//\(/}"; done

for i in ./*\)*; do mv -- "$i" "${i//\)/}"; done

for i in ./*\[*; do mv -- "$i" "${i//\[/}"; done

for i in ./*\]*; do mv -- "$i" "${i//\]/}"; doneSimple code that cleans up file names and removes many of the non-standard spaces or characters found in many MS Windows files names either created by MS, vendors, or end users.

Goal: Be able to run this in a directory and have it drill down into sub-directories, but not go up directories.

ex: current path: /home/user/foo

run in there and touch all files and directory names recursively.

Thank you in advance.latest?d=yIl2AUoC8zA latest?i=q89nmfvOom4:3wSdlUcAc8k:F7zBnMy latest?i=q89nmfvOom4:3wSdlUcAc8k:V_sGLiP latest?d=qj6IDK7rITs latest?i=q89nmfvOom4:3wSdlUcAc8k:gIN9vFwq89nmfvOom4
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments