I'm trying to rename files contains double quotes with file name in directory.
/tables/ddl/ directory
"user".sql
"customer".sql
inventory.sql
"orders".sql
Would like to remove double quotes in file names which contains that. Like this:
user.sql
customer.sql
inventory .sql
orders.sql
In my shell script, To find the files with double quotes i used find command with regax as follows. It shows list of files with double quotes.
find . -name '*["]*'
Also i tried fo relaying directory and rename files.
for myfile in /tables/ddl/*; do
echo $myfile
rename 's,^[0-9]{2}\.,,' *sql
done
Is that possible to at the same time find and rename files contains with double quotes?