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的更多相关文章

  1. Web安全相关(三):开放重定向(Open Redirection)

    简介 那些通过请求(如查询字符串和表单数据)指定重定向URL的Web程序可能会被篡改,而把用户重定向到外部的恶意URL.这种篡改就被称为开发重定向攻击.   场景分析 假设有一个正规网站http:// ...

  2. 当nginx 500 伪静态错误时,记录解决方法rewrite or internal redirection cycle while processing

    错误日志::rewrite or internal redirection cycle while processing "/index.php/index.php/index.php/in ...

  3. 3xx Redirection

    3xx Redirection This class of status code indicates the client must take additional action to comple ...

  4. Advanced redirection features

    here are three types of I/O, which each have their own identifier, called a file descriptor: standar ...

  5. Dynamic-Link Library Redirection

    Dynamic-Link Library Redirection Applications can depend on a specific version of a shared DLL and s ...

  6. PLT redirection through shared object injection into a running process

    PLT redirection through shared object injection into a running process

  7. Web安全相关(三):开放重定向(Open Redirection)

    简介 那些通过请求(如查询字符串和表单数据)指定重定向URL的Web程序可能会被篡改,而把用户重定向到外部的恶意URL.这种篡改就被称为开发重定向攻击. 场景分析 假设有一个正规网站http://ne ...

  8. 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 ...

  9. 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 "/ ...

  10. Linux之IO Redirection

    一.引言 前几天使用一个linux下的内存检测工具valgrind,想要把检测的结果重定向到文件,结果总是没有任何内容,最后才发现是重定向的原因,它输出的信息是输出到stderr的,所以我使用 > ...

随机推荐

  1. vue单页应用前进刷新后退不刷新方案探讨

    引言 前端webapp应用为了追求类似于native模式的细致体验,总是在不断的在向native的体验靠拢:比如本文即将要说到的功能,native由于是多页应用,新页面可以启用一个的新的webview ...

  2. MySQL注入技巧性研究

    0x00 前言 MySQL是一个关系型数据库管理系统,由瑞典MySQL AB 公司开发,目前属于 Oracle 旗下产品.MySQL 是最流行的关系型数据库管理系统之一,本人最近针对MySQL注入做了 ...

  3. Java 多线程开发之 Callable 与线程池

    前言 我们常见的创建线程的方式有 2 种:继承 Thread 和 实现 Runnable 接口. 其实,在 JDK 中还提供了另外 2 种 API 让开发者使用. 二.简单介绍 2.1 Callabl ...

  4. MySql必备技能 不会的赶紧get一下 可以说很详细了

    1.Mysql服务 mysql服务如何开启: 下载了mysql数据库你的服务中会有mysql服务. 1.1: 1.2: 2.使用sql语句进行 建库.建表.等操作. 2.1:使用sql语句进行创建数据 ...

  5. 【面试题】java中高以上必会技能

    java基础 1.集合相关 1.1 java中常见的集合 答:Arraylist,LinkedList,ListedList,HashMap,HashSet. 1.2 arraylist和linked ...

  6. android自动化必备之界面元素

    包名&类名 packageName(包名) 应用的身份标识,系统通过包名识别不同的应用,如两个相同包名的应用在安装时候会覆盖 activityName(类名) Activity:android ...

  7. linux audit工具

    一个不错的博客,可以吸收营养,等读完后再决定写什么? https://www.cnblogs.com/bldly1989/p/7204358.html changelog -------------- ...

  8. CentOS7+Mono5.2.0.224 +Jexus5.8.3.0 布署 Asp.Net MVC (vs2017)

    背景: 比起大神我们只是差远了,只知道一味的找找看,找的资料不少,但真不知道哪一个是正确的. 之前一个文章也写了怎么安装 Jexus 但始终只有是html的静态页面可以asp.net 都不行(http ...

  9. 如何走上更高平台分享传递干货知识:(开通个人Github面向开源及私有软件项目的托管平台:https://github.com/zlslch/)(图文详解)(博主推荐)

    不多说,直接上干货! https://github.com/ 欢迎大家,加入我的微信公众号:大数据躺过的坑        人工智能躺过的坑       同时,大家可以关注我的个人博客:    http ...

  10. TOMCAT源码分析(转)

    前言:   本文是我阅读了TOMCAT源码后的一些心得. 主要是讲解TOMCAT的系统框架, 以及启动流程.若有错漏之处,敬请批评指教!建议:   毕竟TOMCAT的框架还是比较复杂的, 单是从文字上 ...