Can't pipe or redirect cygwin grep output
Posted
by
Thomas
on Super User
See other posts from Super User
or by Thomas
Published on 2011-11-17T16:16:53Z
Indexed on
2011/11/17
17:55 UTC
Read the original article
Hit count: 308
How do I get grep to work properly in a regular cmd.exe?
> grep -o 'ProductVersion\".*\".*\"' foo.txt | grep -o '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+'
foo.txt:ProductVersion" Value="59.59.140.59"
grep: |: No such file or directory
grep: grep: No such file or directory
grep: [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+: No such file or directory
and
> grep -o 'ProductVersion\".*\".*\"' foo.txt >> blah.txt
foo.txt:ProductVersion" Value="59.59.140.59"
grep: >>: No such file or directory
grep: blah.txt: No such file or directory
© Super User or respective owner