YanoRyuichi.com/
Wiki
Blog
GitHub
Sandbox
開始行:
* echo [#y7498fb6]
** Write-OutputとWrite-Host [#b93a037a]
- Write-Outputはコマンドレットの結果をパイプラインに渡す...
- コマンドレットの終端でechoしたい時はWrite-Hostを使う。
PS> function Receive-Output
{
process { Write-Host $_ -ForegroundColor Green }
}
PS> Write-Output "this is a test" | Receive-Output # ...
PS> Write-Host "this is a test" | Receive-Output # ...
PS> Write-Output "this is a test" # ...
*** 参考 [#qf7fbac8]
http://windowsitpro.com/powershell/q-should-i-ever-use-wr...
終了行:
* echo [#y7498fb6]
** Write-OutputとWrite-Host [#b93a037a]
- Write-Outputはコマンドレットの結果をパイプラインに渡す...
- コマンドレットの終端でechoしたい時はWrite-Hostを使う。
PS> function Receive-Output
{
process { Write-Host $_ -ForegroundColor Green }
}
PS> Write-Output "this is a test" | Receive-Output # ...
PS> Write-Host "this is a test" | Receive-Output # ...
PS> Write-Output "this is a test" # ...
*** 参考 [#qf7fbac8]
http://windowsitpro.com/powershell/q-should-i-ever-use-wr...
ページ名: