PowerShell -Part 4at TECH
PowerShell -Part 4 - 暇つぶし2ch149:デフォルトの名無しさん
20/03/23 22:15:40 nB8lN/u6.net
さすがにそんなシンタックスはないが同じような動作はできる

$continuation = @{
  A = { select Name,Age | Write-Host -f Cyan }.GetSteppablePipeline()
  B = { select Name,Gender | Write-Host -f Magenta }.GetSteppablePipeline()
  C = { select Name | Write-Host -f Yellow }.GetSteppablePipeline()
}
$continuation.Values.ForEach("Begin", $true)

@"
Name,Age,Gender
A,12,Male
C,93,Female
B,32,Male
A,52,Female
C,73,Female
"@ | ConvertFrom-Csv | foreach { $continuation[$_.Name].Process($_) }

$continuation.Values.ForEach("End")


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch