LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   grep in UnxUtils on Windows XP (https://www.linuxquestions.org/questions/linux-software-2/grep-in-unxutils-on-windows-xp-735265/)

aidanwhitehall 06-24-2009 07:15 AM

grep in UnxUtils on Windows XP
 
Not sure where else to turn for help on this one (as the UnxUtils forum is pretty quiet...)

I'm using UnxUtils on a Windows XP workstation and am struggling with the syntax for grep (FWIW "grep --version" returns 2.5.1).

I'm trying to parse the output from a local printer's status page, and am failing to get lookahead working when piping the value from wget into grep.

This works fine and returns lots of matches:

wget -q -O- "http://10.0.0.99/status" | grep -E Helvetica

However this returns nothing

wget -q -O- "http://10.0.0.99/status" | grep -E Helv(?=etica)

Do lookaheads normally work with grep on the commandline? I'm not sure if the '-E' is correct either (but have tried -e and -G with no more success).

Is there something I'm missing... ? Thanks!

ghostdog74 06-24-2009 07:17 AM

why don't you get grep from GNU ?

aidanwhitehall 06-24-2009 08:05 AM

Quote:

Originally Posted by ghostdog74 (Post 3584560)
why don't you get grep from GNU ?

I was unaware of GnuWin32. Thanks, I'll give it a shot.


All times are GMT -5. The time now is 12:17 AM.