What does the period '.' operator do in powershell?

后端 未结 4 976
梦谈多话
梦谈多话 2020-12-28 13:46

This is a weird one. Normally when I execute an external command from powershell I use the & operator like this:

& somecommand.exe -p so         


        
4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-28 14:38

    The dot is a call operator:

    $a = "Get-ChildItem" 
    . $a # (executes Get-ChildItem in the current scope)
    

    In your case, however, I don't see what it does.

提交回复
热议问题