Hello, Im writing a script that works by recursively going into directories with find. But I have some directories that have spaces in them.. so I need to parse the variables to add a backslash before the spaces.
Im not exactly sure how how to do this in bash, and honestly I dont think I know how to do this in perl either
example of one of the variables I am working with is this:
$myvar = File 1/File 2/this is my file.txt
So I need to make my variable this --
$myvar = File\ 1/File\ 2/this\ is\ my\ file.txt
and if it matters, myvar is generated in a loop with the find command: `find File\ 1/File\ 2/ -name "*.txt" -print`
Thanks for any help.
Trey