免费注册 查看新帖 |

Chinaunix

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

奇怪的重定向问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-10-19 14:47 |只看该作者 |倒序浏览
#!/bin/sh
printf "create table\n"

BTABLE_NAME=t_acct_safe_b_${2}
TTABLE_NAME=t_acct_safe_t_${2}
BQQTABLE_NAME=t_acct_safe_bqq_${2}

/usr/local/mysql/bin/mysql -uroot $1 <<!
    drop table if exists ${BTABLE_NAME};

    create table ${BTABLE_NAME}(
        fault_code int,
        forder int,
        fapp_id int,
        fuser_ip int unsigned,
        fapp_ip int unsigned,
        fuin int unsigned,
        ftran_amt float,
        ftran_time int unsigned
    );

    drop table if exists ${TTABLE_NAME};

    create table ${TTABLE_NAME}(
        forder int,
        fapp_id int,
        fuser_ip int unsigned,
        fapp_ip int unsigned,
        fuin int unsigned,
        ftran_amt float,
        fbalance float,
        ftran_time int unsigned
    );

    drop table if exists ${BQQTABLE_NAME};

    create table ${BQQTABLE_NAME}(
        fault_code int,
        forder int,
        fapp_id int,
        fuser_ip int unsigned,
        fapp_ip int unsigned,
        fuin int unsigned,
        providefuin int,
        ftran_amt float,
        fbalance float,
        ftran_time int unsigned,
        value1 int,
        value2 int,
        value3 int,
        value4 int
    ) TYPE=MyISAM;

!
奇怪了。怎么会在<<后面出现! 而最后居然也是以!结束的。why??

[ 本帖最后由 kejunlqp 于 2007-10-19 14:48 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-10-19 14:51 |只看该作者
Search "here documents" in Shell section.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP