linux 中here documents 的写法
来源:互联网 发布:中国战争 知乎 编辑:程序博客网 时间:2024/06/05 02:39
linux中关于here documents的写法,是关于cat的用法:
#!/bin/sh
# we have less than 3 arguments. Print the help tesxt:
if [ $# -lt 3 ]; then
cat << HELP
ren -- renames a number of files using sed regular expressions
USAGE:
ren 'regexp' 'replacement' files...
EXAMPLE:
rename all *.HTM files in *.html:
ren 'HTM$' 'html' *.HTM
HELP
exit 0
fi
用 cat 命令,以<<开始,后面接HELP单词,然后以HELP结束,中间的内容就是可以显示的内容。
$ ./ren
ren -- renames a number of files using sed regular expressions
USAGE:
ren 'regexp' 'replacement' files...
EXAMPLE:
rename all *.HTM files in *.html:
ren 'HTM$' 'html' *.HTM
$
- linux 中here documents 的写法
- Bash中使用多行注释的方法(Here Documents)
- Unix/Linux Shell编程实战:使用嵌入文档Here Documents
- Here Documents嵌入式文档
- Bash Here Documents
- 【shell】嵌入文档Here Documents
- Shell编程(六)---Here Documents与Dialog
- Shell编程(六)---Here Documents与Dialog
- Mongodb中对Documents的子集筛选
- linux 中shell的简单写法
- linux shell的here document用法
- shell 中 here documemt << 与 <<- 的区别
- Github 中Git Bash Here 的用法
- Shell编程(六)---Here Documents与Dialog (转帖)
- shell脚本Here documents使用注意点(顶格)
- Linux Kernel Compiling Documents
- Linux中拷贝 cp命令中拷贝所有的写法
- Windows XP 系统中 My Documents 文件夹消失的解决之道
- TreeList 数据加载2
- 遇到的问题
- 疑难问题
- PowerDesigner 教程系列(八)概念数据模型
- PowerDesigner教程系列(七)概念数据模型
- linux 中here documents 的写法
- 转Android系统架构
- 飞鸽传书的这一新的通信方式采用云技术
- 在PowerDesigner中设计物理模型1——表和主外键
- 学习c++的50条忠告
- 如何写出高性能SQL,34条建议
- 使用BusyBox构建文件系统for OMAP3530
- 对象的继承关系在数据库中的实现方式和PowerDesigner设计
- 经典电子版IT书籍下载地址