backup database shell error?
#!/bin/sh
sqlplus -s system/system <<EOF >/dev/null
set heading off;
set term off;
set echo off;
set pagesize 0;
set linesize 1000;
set trimspool on;
set trimout on;
set feedback off;
set colsep = ;
spool backup.spl
select tablespace_name,file_name from dba_data_files order by tablespace_name,file_name;
spool off;
exit
EOF
tr -d ' ' < backup.spl > backup.cfg
TABLESPACES='cut -d= -f1 backup.cfg|uniq'
BACKUP_CFG=backup.cfg
for tablespace in $TABLESPACES
do
#echo $tablespace
DATAFILES='awk -v var=$tablespace -F = '$1==var {print $2}' $BACKUP_CFG'
for datafile in $DATAFILES
do
echo $datafile
done
done
when I run this shell, I get the error
[oracle@webserver10 dbscript]$ ./backup.sh
./backup.sh: line 23: {print: command not found
./backup.sh: line 23: {print: command not found
./backup.sh: line 23: {print: command not found
./backup.sh: line 23: {print: command not found
why?....................
somebody can tell me??????????????????????????