replacing space in filenames
is there any way to replace spaces in filenames with, for example, '_'?? I have a whole bunch of files that origin from the windows world, and my bash scripts aren't working well with the "space" characters in filenames. Thanks for your time.
try this bash script
So, since I'm such a rookie with these bash scripts, I have to ask if this script would do the work (replace all spaces in directory and file names with '_' in all subdirs of the directory it runned from)
DIRS=$(find . -type d)
for d in $DIRS; do
for i in *; do mv "$i" `echo $i | tr ' ' '_'`; done
|All times are GMT -5. The time now is 11:47 AM.|