zoukankan      html  css  js  c++  java
  • pipelines和重定向命令

    pipelines:

    command1 | command2

    例如,ls -l /usr/bin | less,将输出结果作为 less 命令的输入结果,在standard output 中显示出来。

    管道命令 “|” 和重定向命令 “>” 的区别

    the redirection operator connects a command with a file while the pipeline operator connects the output of one command with the input of a second command.

    也就是说,重定向连接的是命令和文件,管道连接的是命令和命令。以下为例:

    # cd /usr/bin
    # ls > less

    这条命令的实际效果是:/usr/bin目录下的 less 文件会被 ls命令的输出结果所覆盖掉,而不是把 ls 命令的输出结果显示在屏幕上 (less 命令)。
    因此,如果命令文件重名,可能发生意想不到的结果。

  • 相关阅读:
    Android开发学习——应用安装过程
    飞信接口
    sql联合查询
    宽度自适应
    数据绑定
    分页查询sql
    asp.net读取文件
    oracle数据库连接
    oracle服务的开始和关闭 CMD
    css导航条
  • 原文地址:https://www.cnblogs.com/yaos/p/14014458.html
Copyright © 2011-2022 走看看