Sunday, January 18, 2009

1,2,3,4 but give me 1 and 2

to return the ones from a list of numbers that are less than 3

PS> 1,2,3,4 | where-object -filterscript {$_ -lt 3}

1
2

'lt' stands for 'less than'.

No comments:

Post a Comment