- Ubuntu 20.04 Essentials
- Neil Smyth
- 127字
- 2021-06-11 17:39:43
9.10 Working with Pipes in the Bash Shell
In addition to I/O redirection, the shell also allows output from one command to be piped directly as input to another command. A pipe operation is achieved by placing the ‘|’ character between two or more commands on a command-line. For example, to count the number of processes running on a system, the output from the ps command can be piped through to the wc command:
$ ps –ef | wc –l
There is no limit to the number of pipe operations that can be performed on a command-line. For example, to find the number of lines in a file which contain the name Smith:
$ cat namesfile | grep Smith | wc –l
推薦閱讀
- Clojure Data Analysis Cookbook
- PIC單片機(jī)C語(yǔ)言非常入門與視頻演練
- Maya 2012從入門到精通
- Blender Compositing and Post Processing
- 網(wǎng)中之我:何明升網(wǎng)絡(luò)社會(huì)論稿
- 精通數(shù)據(jù)科學(xué):從線性回歸到深度學(xué)習(xí)
- 軟件構(gòu)件技術(shù)
- Salesforce Advanced Administrator Certification Guide
- 格蠹匯編
- Linux Shell編程從初學(xué)到精通
- 從零開始學(xué)JavaScript
- Hands-On Business Intelligence with Qlik Sense
- Microsoft 365 Mobility and Security:Exam Guide MS-101
- 微控制器的選擇與應(yīng)用
- Photoshop CS4圖像處理考前12小時(shí)