Search

$_.Index property for easy indexing by S.K. _

Active

2
0
Sign in
to vote
Type: Suggestion
ID: 770675
Opened: 11/10/2012 3:26:03 AM
Access Restriction: Public
0
Workaround(s)
Please add something to index pipe objects.

$_.Index, $%, $& and so on.




--Example--

PS > 1,3,4,5,7,9,10,11,13 | group { $_-$_.Index }

Count Name                     Group
----- ----                     -----
    1 1                         {1}
    3 2                         {3, 4, 5}
    1 3                         {7}
    3 4                         {9, 10, 11}
    1 5                         {13}


PS > $a = 6, 1, 7, 3, 2
PS > $b = 1, 5, 4, 4, 3

PS > $a | ? { $_ -gt $b[$%] }
6
7
Details (expand)
How often does this happen?
Always Happens
Have you seen this problem before in this product?
No, this is new to the most recent version
Reproduction Steps
 
Expected Results
 
File Attachments
0 attachments
Sign in to post a comment.
Sign in to post a workaround.