问题描述
我希望有人能告诉我如何扩展从文件中读取的变量 ($ORACLE_PATCH_DIR)。
代码如下。
输入文件:
cat patch_list_db.txt
$ORACLE_PATCH_DIR/32579100/32518631/31704029
Korn Shell 脚本
# Read one patch location at a time from the patch_list_db.txt file and apply the patch
while read DIR_NAME
do
str="DIR_NAME: $DIR_NAME"
print_function "$str"
cd $DIR_NAME
ls
str="Current Dir: `pwd`"
print_function "$str"
done <"$file_name"
结果:
./apply_db_patch.ksh patch_list_db.txt
Oracle Patch Dir: /u2/patches
16:14:34 ===> DIR_NAME: $ORACLE_PATCH_DIR/32579100/32518631/31704029
提前致谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)