Re: Can anybody confirm whether this is a bug?about circumflex's meaning

GnuWin32 <[email protected]> Sun, 6 Sep 2009 20:46:59 +0200
Newsgroups gmane.comp.windows.gnu.user
Message-ID <598752134670426D8A5F5D2DC2A2418E@HPDESKTOP>
> in command line:
> *echo 0123456 | grep -E -o ^1.*
>
> result:
> *12*

At the MS-Windows command line, the caret (^) has a special meaning; see 
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/cmd.mspx?mfr=true. 
Thus, you should double-quote an argument containing a caret or double the 
caret in order to have grep, or any other command-line program, see one 
caret. This is easily seen when you compare the commands
echo ^x
echo "^x"
echo ^^x
So this is a case where the MS-Windows command line behaves differently from 
a Unix shell.

Kees Zeelenberg
 


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july