need help with UNIX and awk

Hi,
I am working on a script where i am fetching a word from a parameter file and using it as output file name .
here is the part of parameter file contents : it basically contains SQL statements.

Select 'SSFNRTP' as TABLE_NAME,UCSTDT,CVOFIDKEY from (Select 'cofvof_interface' as interface_filename,UCSTDT,CASE WHEN TRANSLATE(SUBSTR(CHAR(UCSTDT),1,8),'*',' 0123456789') = '' THEN CASE WHEN SUBSTR

from this statement, i am fetching 'cofvof_interface' by using following code in my script:

while read Record1
do
SQLQuery=`echo $Record1 | awk '{printf $0 }'`
InputfileName=`echo $Record1 | awk '{printf $7 }'`

and using it as output file name

$InputfileName-$mdt.csv

where mdt is current date

the problem is when i fetch
InputfileName=`echo $Record1 | awk '{printf $7 }'
i am getting 'cofvof_interface' which is correct and my file name will be then 'cofvof_interface'-08_10_02.csv
but i don't want quotes with it . Is there any way if i can get file name without quotes like : cofvof_interface-08_10_02.csv
I would really appreciate any kind of help.
Thanks

Use gsub inside the awk script, or pass the output through tr -d "'"

InputfileName=`echo $Record1 | awk '{printf $7 }' | tr -d "'"`

Thank u so much era, i used tr -d "'" and it's working fine ...:slight_smile: