DISQUS

DISQUS Hello! Tech-Recipes is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Tech-Recipes

Cookbook of Tech Tutorials
Jump to original thread »
Author

msh: Extract text from a stream with grep-string | Windows Monad msh | Tech-Recipes

Started by qdideas · 9 months ago

No excerpt available. Jump to website »

3 comments

  • I regularly (heh) use dir/s/b | findstr /f:/ /r "^my.*reg[a-z][^0-9]expr>" in the Windows cmd shell
  • Sadly, it would appear that grep-string is not a part of MSH Beta 3:

    [C:]: dir | grep-string
    'grep-string' is not recognized as a Cmdlet, function, operable program, or script file.
    At line:1 char:17
    + dir | grep-string <<<<
    [C:]:



    Thomas
    (http://tfl09.blogspot.com)
  • Thomas,
    I didn't use beta 3, so I don't know if its the same, but there is now the select-string cmdlet (as of PowerShell RC1)
    If it is the same, you'd probably already know about it (since you're blog has quite a bit of info on msh(PowerShell)

    However, for others passing through, I thought I'd post this example:

    > set-content test.txt "Hello World"
    > dir *.txt|select-string ^H.*d$
    test.txt:1:Hello World

Add New Comment

Returning? Login