Does anyone know what $symbol does outside brackets in
powershell as in write-host "The file name is $($filename)"
我也注意到当我编写如下函数时
function time()
{write-host "The time is $(get-date)"}
return time
AND
function time
{ Write-host "the time is (get-date)"}
time
获取日期输出的格式会发生变化,具体取决于我是否在$(get-date)中放置括号外的$符号以及何时使用没有任何符号的(get-date)。
有没有人知道如何在powershell帮助命令中搜索帮助文件中$符号的含义?
感谢您