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 Jan 9, 2019
yes | 要回到的命令
---------- 可以 man yes 看具体 |
3
fo2w Jan 9, 2019 expect script
|
4
shylockhg Jan 9, 2019
printf
echo etc. 管道默认就是 STDIO |
5
www5070504 Jan 9, 2019
刚试了下 这个 yes 命令还真是。。。
|
6
ZXCDFGTYU Jan 9, 2019
yes | 命令
|
7
crazypig14 Jan 9, 2019
expect + spawn,不过这里 yes 就够了
|
8
NB40B938mff85mtq Jan 9, 2019
@ZXCDFGTYU +1 正解
|