`

Here document

 
阅读更多

维基百科

http://en.wikipedia.org/wiki/Here_document

 

具体应用:

与sqlplus、rman命令行的交互,例如

$ more rman.sh 
#!/bin/bash
rman target / <<!
show all;
exit;

 

这个命令就可以备份数据库

 

分享到:
评论

相关推荐

    linux shell的here document应用1

    2.1 考生基本信息文件在当前目录下有所有考生的基本注册信息文件,每个考生保存为一个文件 2.2 汇总文件为了给竞赛主办方的人员一个清晰的材料,需要将这650个

    shell脚本学习手册

    Shell教程入门 3 1、shell脚本 3 2、shell脚本实践 4 Shell变量 4 1、使用变量 5 2、只读变量 5 3、删除变量 5 4、变量类型 6 5、shell字符串 6 ...4、Here Document 32 5、/dev/null文件 33 Shell文件包含 33

    cygwin中文教程

    Here Document 進階變數設定 亂數產生 eval:使shell掃瞄命令二次 本節習題 6.萬用字元 7.標準輸入/輸出/錯誤及I/O轉向與管線 本節習題 8.正規表示式 何謂正規表示式(Regular Expressions) 一點. ^ $ [...] * \{...\...

    高级Bash脚本编程指南.pdf

    Here Document 17.1. Here String 18. 休息片刻 第四部分. 高级主题 19. 正则表达式 19.1. 一份简要的正则表达式介绍 19.2. 通配(globbing) 20. 子shell 21. 受限shell 22. 进程替换 23. 函数 ...

    学习shell必备(CN).chm

    17. Here Document 17.1. Here String 18. 休息片刻 第四部分. 高级主题 19. 正则表达式 19.1. 一份简要的正则表达式介绍 19.2. 通配(globbing) 20. 子shell 21. 受限shell 22. 进程替换 23. 函数 23.1. 复杂函数和...

    Linux高级bash编程

    Here Documents 17.1. Here Strings 18. 休息时间 Part 4. 高级 19. 正则表达式 19.1. 一个简要的正则表达式介绍 19.2. 通配 20. 子shell(Subshells) 21. 受限shell(Restricted Shells) 22. 进程替换...

    Advanced Bash-Scripting Guide <>

    使用 "here document" 来调用 bc 12-45. 计算圆周率 12-46. 将10 进制数字转换为16 进制数字 12-47. 因子分解 12-48. 计算直角三角形的斜边 12-49. 使用 seq 来产生循环参数 12-50. 字母统计 12-51. 使用getopt 来...

    Perl 实例精解(第三版).pdf

    3.4.2 无引号打印:here document 练习2 编写literals脚本 第4章 变量 4.1 关于Perl变量 4.1.1 类型 4.1.2 作用域和包 4.1.3 命名规范 4.1.4 赋值语句 4.1.5 引号规则 4.2 标量、数组和散列 ...

    怎样学习Linux 脚本编写基础

    一个 "Here document" 以 《 开头,后面接上一个字符串,这个字符串还必须出现在here document的末尾。下面是一个例子,在该例子中,我们对多个文件进行重命名,并且使用here documents打印帮助:  #!/bin/sh  # ...

    嵌入式系统/ARM技术中的怎样学习Linux 脚本编写基础

    一个 "Here document" 以 《 开头,后面接上一个字符串,这个字符串还必须出现在here document的末尾。下面是一个例子,在该例子中,我们对多个文件进行重命名,并且使用here documents打印帮助:  #!/bin/sh  # ...

    CopyRightNoticeGenerator:GPL版权声明的Shell脚本和模板。-开源

    有关如何使用“ here document”的示例在UNIX shell脚本中,“ here document”的惯用法可以使变量替换更加容易。 这个shell脚本取决于“ here document”表达式。 因此,您可以将其视为如何使用“此处文档”的示例...

    Linux_Shell编程基础

    目录 • 1 变量赋值和引用 2 Shell 里的流程控制 o 2.1 if 语 句 o 2.2 && 和 || 操作符 ...• 4 Here Document • 5 Shell 里的函数 6 Shell 脚本示例 o 6.1 二进制到十进制的转换 o 6.2 文件循环拷贝 • 7 脚本调试

    Oracle基础:通过sqlplus执行sql语句后的结果进行判断

    这篇文章介绍一下如何对sqlplus执行的sql语句结果进行判断。... 问题1可以通过前文提到的Here Document来解决。 问题2,则可以通过对输出的判断来进行,因为Oracle的错误代码基本以ORA-打头,所以

    ns2 document

    document, you can find almost every thing you need about ns2 here. hope you will love it.

    New Microsoft Word Document_notebook_

    nothing in here

    查询地理位置Here-launchers.zip

    Here-launchers 是一个 HERE Launchers API 开发包 。使用它,开发者可以查询到相关的地理位置。 分享 window._bd_share_config = { "common": {...

    svn安装配置手册 svn安装配置手册 svn安装配置手册

    svn安装配置手册 svn安装配置手册 svn安装配置手册

    Gecko DOM Reference

    This section describes the guide itself: who it’s for, how the ... As reference information for the various members of the huge APIs becomes available, it is integrated into this document here.

    Latex文档命令及式等的基本操作介绍.docx

    Latex文档命令及式等的基本操作介绍 1.创建一个空白的 LaTeX 文档。 在你的文本编辑器中新建一个文档,使用扩展名为".tex"。你的文档 应该如下所示: ...\documentclass{article}。...Here we p

    NIST SP800-126r3.pdf

    Other versions of SCAP and the component specifications, including emerging specifications and future versions of SCAP, are not addressed here. Future versions of SCAP will be defined in distinct ...

Global site tag (gtag.js) - Google Analytics