grep caret problem
"Art Peel" <[email protected]>
| Newsgroups | gmane.comp.windows.gnu.user |
|---|---|
| Message-ID | <[email protected]> |
I have a file (example.txt) that contains the following six lines: something else /Type /Pages /Type /Page /Type /Page >> /Type /Page/Foo something else When I run the following in a cmd shell on XP using GnuWin's port of grep 2.51, I expect the result 3 but instead get 0: grep --count "/Type /Page[^s]" example.txt 0 When I run the same command in cygwin with cygwin's port of grep 2.51, I do get the expected result. Unfortunately, I need to make this work in a Windows BAT script, so cygwin is not an option. DOS uses the ^ as a line-continuation character in BAT files. Perhaps it's interfering? I've looked around but haven't found a way to make the caret work. Any suggestions? Cheers, Art Peel ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ GnuWin32-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gnuwin32-users