I am trying to create a script which validates the incoming source files. The script has File name Pattern as Argument. The First part of the script validates if there are any files available
if [ -f $FILE_NAME ]
then
echo "\n Files are available to process \n"
else
echo "\n File does not exist: Process is Terminating \n"
exit 1
fi
I want to rename each of these files with out the single quotes as below
abc.def.ghi.jkl
abc.def.xty.xyz
abc.def.rew.ter
I am trying to do that using below code
for FILE_NAME in $FILE_NAME
do
mv "'$FILE_NAME'" "$FILE_NAME"
The Problem is when i am pass the argument with single quotes the mv command throws error.
I want to achieve 2 things
1.pass the argument(Filename) without the Single quotes by changing the internal code
2.Rename the files without the single quotes.
all the three codes still want me to give the file name with single quotes as an argument ......is there anyway that i can do it with out giving the single quotes in the argument