Hi ,
I have bunch of sql file which contain UHCDEV01 in them . I want to replace all the UHCDEV01 with UHCETL01 in all the files. I have written this code which shows correct output on sh -x but doesn't change the output file .
#cat change_dbname.shl
#!/bin/ksh
####################################
ls -ltr *.sql | awk '{ print $9 } ' | while read file
do
sed -e 's/UHCDEV01/UHCETL01/g' $file > $file1
done
Thanks in advance