PowerShell “Period” operator, what does it do?

后端 未结 3 946
太阳男子
太阳男子 2021-01-29 03:43

I\'ve been looking online for a specific answer to better help me understand how this works. In PHP we use the \" . \" to concatenate strings. However in powershell I see things

3条回答
  •  余生分开走
    2021-01-29 04:20

    DIR command is similar to Get-ChildItem command. The | is similar to foreach statement. The $_ sign indicates each element in foreach loop. In your case, the code should get all which have .txt extension from some location and then rename each of those elements due to { $_.name –replace “.“,”-” } rule

提交回复
热议问题