This is what I have so far.
#! /bin/bash
cd DirectoryName
for file in *.csv; do
#echo $file
filename=${file%.*}
file_clean=${filename//[ ()$+&\.\-\'\,]/_}
final= "$file_clean.csv"
mv "$file" $final
done
cd ..
|
feedback
|
|
I would use the following:
The only changes are: 1) There was a space after the = in the line 2) Instead of using the string substitution command I have used the This should match some more special characters that are hard to specify via direct substitution, such as | |||||||||
feedback
|