export ORACLE_SID=SMTCWHDB
rman target /
DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-5';
yes or no
crosscheck archivelog all;
delete expired archivelog all;
exit
在执行这个 sheel 到了第四句时候 要输入 yes 回车 怎么写?
1
alexsunxl 2019 年 1 月 9 日
yes | 要回到的命令
---------- 可以 man yes 看具体 |
3
fo2w 2019 年 1 月 9 日 expect script
|
4
shylockhg 2019 年 1 月 9 日
printf
echo etc. 管道默认就是 STDIO |
5
www5070504 2019 年 1 月 9 日
刚试了下 这个 yes 命令还真是。。。
|
6
ZXCDFGTYU 2019 年 1 月 9 日
yes | 命令
|
7
crazypig14 2019 年 1 月 9 日
expect + spawn,不过这里 yes 就够了
|
8
NB40B938mff85mtq 2019 年 1 月 9 日
@ZXCDFGTYU +1 正解
|