backup database shell error?

blueocean999 2003-09-12 09:49:23
#!/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??????????????????????????
...全文
79 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧