免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1434 | 回复: 4
打印 上一主题 下一主题

shell问题求助 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-07-31 09:51 |只看该作者 |倒序浏览
这是db2备份脚本:有几个不明白的地方想求助下


db2 <<! >>tables

connect to safedb user shenbao using shenbao
list tables
quit
!           (这个叹号有什么用?)

for name in `cat  tables|grep TBL |awk '{print $1}'`
do
echo $name
db2 <<!        (这句是什么意思?)
connect to safedb user shenbao using shenbao
export to '/home/db2inst1/backup/IXF/$name' OF IXF select * from $name
quit
!
done   

谢谢

[ 本帖最后由 soccer 于 2006-7-31 10:42 编辑 ]

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
2 [报告]
发表于 2006-07-31 09:54 |只看该作者
man shell manpage, see HERE document

论坛徽章:
0
3 [报告]
发表于 2006-07-31 10:16 |只看该作者
原帖由 寂寞烈火 于 2006-7-31 09:54 发表
man shell manpage, see HERE document



不好意思,找不到相关的document


谢谢

论坛徽章:
8
摩羯座
日期:2014-11-26 18:59:452015亚冠之浦和红钻
日期:2015-06-23 19:10:532015亚冠之西悉尼流浪者
日期:2015-08-21 08:40:5815-16赛季CBA联赛之山东
日期:2016-01-31 18:25:0515-16赛季CBA联赛之四川
日期:2016-02-16 16:08:30程序设计版块每日发帖之星
日期:2016-06-29 06:20:002017金鸡报晓
日期:2017-01-10 15:19:5615-16赛季CBA联赛之佛山
日期:2017-02-27 20:41:19
4 [报告]
发表于 2006-07-31 10:29 |只看该作者

  1.               <<[-]word
  2.                       here-document
  3.               delimiter

  4.        No parameter expansion, command substitution, arithmetic expansion, or
  5.        pathname expansion is performed on word.  If any  characters  in  word
  6.        are  quoted, the delimiter is the result of quote removal on word, and
  7.        the lines in the here-document are not expanded.  If word is unquoted,
  8.        all  lines  of the here-document are subjected to parameter expansion,
  9.        command substitution, and arithmetic expansion.  In the  latter  case,
  10.        the  character  sequence  \<newline> is ignored, and \ must be used to
  11.        quote the characters \, $, and '.

  12.        If the redirection operator is <<-, then all  leading  tab  characters
  13.        are stripped from input lines and the line containing delimiter.  This
  14.        allows here-documents within shell scripts to be indented in a natural
  15.        fashion.

复制代码


曾子曰: 以纯朴无知为荣,以食嗟之食为耻

论坛徽章:
0
5 [报告]
发表于 2006-07-31 10:46 |只看该作者
这个!号可以是任何字符,只要前后对应上就行,表示在两个! 号之间的是交互输入的,不需要手动输入
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP