1.所有的zip文件放在一个目录并解压
2.取出所有目录的名字存放于一个文件中
ls -ltr | awk '{print $NF}' | grep -v zip >df.li
一般df.li中第一行需要删除掉
3.把命令输出到shell脚本
cat df.li | while read line
do
patchbase=/volume/r02/applgerpa/patch_merged/ad
patchno=$line
patchname=$line
echo "patchbase=/volume/r02/applgerpa/patch_merged/ad
patchno=$line
patchname=$line
adpatch defaultsfile=$APPL_TOP/admin/$TWO_TASK/def.txt logfile=u$patchname.log patchtop=$patchbase/"$patchname" driver=u$patchno.drv workers=32
ls -ltr | awk '{print $NF}' | grep -v zip >df.li
一般df.li中第一行需要删除掉
3.把命令输出到shell脚本
cat df.li | while read line
do
patchbase=/volume/r02/applgerpa/patch_merged/ad
patchno=$line
patchname=$line
echo "patchbase=/volume/r02/applgerpa/patch_merged/ad
patchno=$line
patchname=$line
adpatch defaultsfile=$APPL_TOP/admin/$TWO_TASK/def.txt logfile=u$patchname.log patchtop=$patchbase/"$patchname" driver=u$patchno.drv workers=32
interactive=yes"
done >adpatch.sh
4.执行脚本
sh adpatch.sh
done >adpatch.sh
4.执行脚本
sh adpatch.sh
本文转自ITPUB博客tolywang的博客,原文链接:批量打patch (adpatch) 的设置步骤,如需转载请自行联系原博主。