I have a number of .csv files with tab delimiter and now I want to change the delimiter. When I use the below script it does not change the file. Please help me with the script.
file_mask=$1
from_delim=$2
to_delim=$3
for i in `ls $file_mask*`
do
sed -i 's|$from_delim|$to_delim|g' $i
done