delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/19/12:41:02

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: grep for \x00 = NUL
Date: Tue, 19 Jul 2005 17:40:32 +0100
MIME-Version: 1.0
In-Reply-To: <NUTMEGFsAitVGeSJIEo00000141@NUTMEG.CAM.ARTIMI.COM>
Message-ID: <SERRANOY1kaAevVDQMP00000614@SERRANO.CAM.ARTIMI.COM>

----Original Message----
>From: fergus
>Sent: 19 July 2005 17:16

> Sorry, probably off topic but so tantalising and so easily stated I
> thought I'd try you. Using grep to locate hex characters in files I've
> used the syntax
> 
> 	grep $'\x0d' # e.g. equivalent to grep "^M"
> 	grep $'\x1a' # e.g. equivalent to grep "^Z"
> 
> and found this to work for all \x01 to \xff, that's 255 of the 256 one
> might be interested in looking for. (Well, I haven't tried them all, but
> a lot of them.) What I still can't do (actually, what I most wanted to
> do) is search for the NUL \x00. Nothing in info bash indicated that this
> approach would not work for \x00, but as far as I can tell, it doesn't:
> files that do not contain \x00 are listed as containing it (try grep
> $'\x00' *). 
> 
> Is it a bug?


  What character is used to indicate the end of a string in C?


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019