本帖最后由 fbzyb 于 2011-08-30 16:10:34 编辑

解决方案 »

  1.   

    <<间隔符
    间隔符,从标准输入中读入,其中的内容传递到之前的命令。后边的!只是一个间隔符,还可以换为别的符号或者字符串,eg: #,abc等。
    另外后边的间隔符!之前最好不要有空格,否则会报错。
      

  2.   

    看下面例子就好了:
    [test@DLCDS3023 ~]$ sqlplus apps/apps@vis<<!
    > select 1 from dual;
    > !SQL*Plus: Release 11.1.0.7.0 - Production on Wed Aug 31 09:05:56 2011Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL>
             1
    ----------
             1SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [test@DLCDS3023 ~]$
      

  3.   

    这个是SHELL里我最喜欢的功能了,叫HERE DOCUMENT
      

  4.   


    正解
    需要说明的是  << 后面的符号必须与结束的符号匹配起来,否则就失效