3 ms·
More compact example (not to scare the POSIX people away :) ): 0..1000000 | where {$_ % 10 -eq 0} | foreach {"Got Value: $_"}
by MatejKafka 3y ago
More compact example (not to scare the POSIX people away :) ):
0..1000000 | where {$_ % 10 -eq 0} | foreach {"Got Value: $_"}
- deleted 3y ago[deleted]
- poizan42 3y agoThe streaming behavior of the range operator is weird though. This is tested on PowerShell 7.4.1 > 0..1000000000 | % { $_ } # Starts printing out numbers immediately > 0..1000000000 # Hangs longer than I had patience to wait for > $x=0..100 > $x.GetType() # IsPublic IsSerial Name BaseType # -------- -------- ---- -------- # True True Object[] System.Array It's an array when I save it in a variable, but it's obviously not an array on the LHS of a pipe.