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

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.

主站蜘蛛池模板: 呼和浩特市| 堆龙德庆县| 淄博市| 拉萨市| 永修县| 常德市| 宜昌市| 贵港市| 梅州市| 崇州市| 恩平市| 浠水县| 肥城市| 固安县| 大名县| 高尔夫| 菏泽市| 根河市| 拉孜县| 房产| 米林县| 鸡东县| 沁水县| 许昌县| 墨江| 阳山县| 滦南县| 黄石市| 保德县| 郸城县| 宜宾县| 开平市| 宜宾县| 南澳县| 江津市| 长子县| 达拉特旗| 睢宁县| 通化县| 多伦县| 南皮县|