官术网_书友最值得收藏!

PowerShell Pipeline

A pipeline is defined in www.TheFreeDictionary.com as follows:

"a linked series of pipes with pumps and valves for flow control, used to transport crude oil, water, etc., esp. over great distances."

I think this definition is very fitting to a pipeline in PowerShell. Instead of crude oil or water, what PowerShell transports is pieces of information. PowerShell also has these pumps and valves for flow control—we will see more of these in the later chapters.

The pipe symbol in PowerShell is |, also called a bar. You can pipe multiple cmdlets together. When you pipe these cmdlets, the output of one cmdlet becomes the input of the next cmdlet:

PowerShell Pipeline

When you are writing your scripts, you may want to add a new line after the pipe and continue typing the next cmdlet on the new line:

PowerShell Pipeline

Many script authors also prefer to indent the succeeding lines a little bit to emphasize that these are all part of the same block.

主站蜘蛛池模板: 泰宁县| 高密市| 拉萨市| 阜平县| 织金县| 连南| 尚义县| 江山市| 曲沃县| 山东| 昭通市| 丹凤县| 六盘水市| 镇原县| 军事| 西乌珠穆沁旗| 明水县| 承德市| 兴安县| 烟台市| 淮北市| 关岭| 新津县| 桃园市| 石屏县| 宁远县| 玉田县| 崇阳县| 莱芜市| 游戏| 沛县| 巍山| 姜堰市| 江津市| 都安| 乌苏市| 明光市| 江油市| 邢台市| 台东县| 英吉沙县|