Boolean-and all incoming pipeline objects in powershell -
what convenient way 'and' pipeline, such returned value true iff every incoming object evaluated true? such as:
$filelist | % { test-path $_ } | boolean-and
the above snippet should testing every file in filelist exists. there no 'boolean-and' function. there different name/way this?
another possibility:
@($filelist | % { test-path $_ }) -notcontains $false
as pipeline function:
function and-boolean { $input -notcontains $false }
Comments
Post a Comment