Re: Inline Pipeline Filter/lambda



"Bruce Payette [MSFT]" <brucepay@xxxxxxxxxxxxx> wrote in message
news:%23geRs9k9FHA.2364@xxxxxxxxxxxxxxxxxxxxxxx
> We've had this suggestion a number of time so it's definitely something
> we'll consider. Now - as an alternative - since we have & { } for invoking
> an in-line function, how about a different 1 character for in-line
> filters? You can try this out using aliases. For example, if you want to
> use %, them do
>
> set-alias % foreach-object

That'll work nicely for now. Thanks. However at some point MSH will be
pervasive enough that I'll be helping someone else and I won't have my
aliases. I also find the "foreach" a bit confusing because I thought the
pipe already provided objects one at a time to the next stage. Have to use
foreach implies that they are all provided at once and I need to iterate
through them. Is that the case?

--
Keith


.



Relevant Pages

  • Re: Inline Pipeline Filter/lambda
    ... how about a different 1 character for in-line filters? ... You can try this out using aliases. ... set-alias % foreach-object ...
    (microsoft.public.windows.server.scripting)
  • Re: math formula substitution and evaluation
    ... (Brackets return a reference to an anonymous array containing the list, ... converting the character to its ascii value and ... foreach my $test { ... If the tests really do look like what you've displayed, then the easiest way would be to make sure your tests are proper perl code, and then run them through "eval". ...
    (perl.beginners)
  • Re: Is there a way to query Security Event Log with Filter in C#?
    ... ManagementObjectSearcher mos = new ManagementObjectSearcher; ... foreach ) ... Example that filters event log by LogFile and TimeGenerated. ... foreach (PropertyData pd in mo.Properties) { ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: php batch uploading multiple files
    ... batch process also makes the filenames unique and writes their names to ... filters out thumbnails ... foreach ...
    (php.general)
  • Re: Xml Array(?) of Values
    ... I fugured start with a string[] like so: ... and then use a foreach to make each element. ... them character for character, you can use an XmlWriter, you can use the ...
    (microsoft.public.dotnet.xml)