Redirection
Typically, the syntax of these characters is as follows, using < to
redirect input, and > to redirect output.
command1 > file1
executes command1, placing the output in file1, as opposed to displaying it at the terminal, which is the usual destination for standard output. This will clobber any
existing data in file1.
Using
command1 < file1
executes command1, with file1 as the source of input, as opposed to thekeyboard,
which is the usual source for standard input.
command1 < infile > outfile
combines the two capabilities: command1 reads from infile and writes tooutfile
Variants[edit]
To append output to the end of the file, rather than clobbering it, use the>> operator:
command1 >> file1
To read from a stream literal (an inline file, passed to the standard input), one can use a here document, using
the << operator:
tr a-z A-Z << END_TEXT
one two three
uno dos tres
END_TEXT
To read from a string, one can use a here string, using the <<< operator:
tr a-z A-Z <<< "one two three"
or:
NUMBERS="one two three"
tr a-z A-Z <<< "$NUMBERS"
Redirection的更多相关文章
- Web安全相关(三):开放重定向(Open Redirection)
简介 那些通过请求(如查询字符串和表单数据)指定重定向URL的Web程序可能会被篡改,而把用户重定向到外部的恶意URL.这种篡改就被称为开发重定向攻击. 场景分析 假设有一个正规网站http:// ...
- 当nginx 500 伪静态错误时,记录解决方法rewrite or internal redirection cycle while processing
错误日志::rewrite or internal redirection cycle while processing "/index.php/index.php/index.php/in ...
- 3xx Redirection
3xx Redirection This class of status code indicates the client must take additional action to comple ...
- Advanced redirection features
here are three types of I/O, which each have their own identifier, called a file descriptor: standar ...
- Dynamic-Link Library Redirection
Dynamic-Link Library Redirection Applications can depend on a specific version of a shared DLL and s ...
- PLT redirection through shared object injection into a running process
PLT redirection through shared object injection into a running process
- Web安全相关(三):开放重定向(Open Redirection)
简介 那些通过请求(如查询字符串和表单数据)指定重定向URL的Web程序可能会被篡改,而把用户重定向到外部的恶意URL.这种篡改就被称为开发重定向攻击. 场景分析 假设有一个正规网站http://ne ...
- ATL项目编译注册dll的时候报权限错误:error MSB8011: Failed to register output. Please try enabling Per-user Redirection or register the component from a command prompt with elevated permissions.
atl工程在vs2013编译的时候会在编译成功之后去使用 regsvr32 去注册 生成的 .dll 偶尔在编译的时候会遇到下面的错误: error MSB8011: Failed to regist ...
- rewrite or internal redirection cycle while processing nginx重定向报错
2018/05/07 15:03:42 [error] 762#0: *3 rewrite or internal redirection cycle while processing "/ ...
- Linux之IO Redirection
一.引言 前几天使用一个linux下的内存检测工具valgrind,想要把检测的结果重定向到文件,结果总是没有任何内容,最后才发现是重定向的原因,它输出的信息是输出到stderr的,所以我使用 > ...
随机推荐
- Java核心技术卷一基础知识-第14章-多线程-读书笔记
第 14 章 多线程 本章内容: * 什么是线程 * 中断线程 * 线程状态 * 线程属性 * 同步 * 阻塞队列 * 线程安全的集合 * Collable与Future * 执行器 * 同步器 * ...
- JSP中的作用域
application用于全局变量,可以获取全局的数据.作用范围比session大. JSP常用内置对象总结:out对象:用于客户端输出数据.request对象:用于处理客户端发送的请求的数据信息.r ...
- 封装手风琴!使用jQuery!
//封装手风琴 /** * * * */ $.fn.accordion = function (colors, width) { var width=width||0; var colors= col ...
- 你不知道的JavaScript --- 作用域相关
本篇是<你不知道的JavaScript>的读书笔记 什么是作用域? 程序离不变量,那么变量存储在哪里?程序需要时如何找到他们? 这些问题说明需要一套设计良好的规则来存储变量, 并且之后可以 ...
- IdentityServer4源码颁发token分析及性能优化
IdentityServer4源码地址 IdentityModel源码地址 以下的流程用ResourceOwnerPassword类型获取token作为介绍 分两种获取形式说明 token请求地址为默 ...
- [原创]K8Cscan插件之多种方式系统版本探测
[原创]K8 Cscan 大型内网渗透自定义扫描器 https://www.cnblogs.com/k8gege/p/10519321.html Cscan简介:何为自定义扫描器?其实也是插件化,但C ...
- C# 在窗体上可拖动控件
最近做了一个标签打印配置功能,需要根据客户需求自定义标签格式.显示内容,这时就用到了后台生成控件,并且其控件可在窗口中进行拖动,这里仅为记录一下实现过程,方便以后使用. 结果图: 源码: using ...
- word标题文字居中浅谈
在Word排版时,要将标题在文档居中,是有区别的,如下图 在回车键后,在选择标题居中,我们常认为标题就是在整个文档居中了,但是实际上只是在回车键到右边区域居中而已,如上图红色方块居中. 只有在标题文字 ...
- 项目总结二:人脸识别项目(Face Recognition for the Happy House)
一.人脸验证问题(face verification)与人脸识别问题(face recognition) 1.人脸验证问题(face verification): 输入 ...
- Java单元测试(Junit+Mock+代码覆盖率)
微信公众号[程序员江湖] 作者黄小斜,斜杠青年,某985硕士,阿里 Java 研发工程师,于 2018 年秋招拿到 BAT 头条.网易.滴滴等 8 个大厂 offer,目前致力于分享这几年的学习经验. ...