SUMMARY : grep commands???

From: Butler, Mathew <ButlerGM_at_logica.com>
Date: Tue, 30 Jul 2002 15:09:19 +1000

THanks to Ian Mortimer.

ORIGINAL QUESTION
=====================

> At the risk of going majorly off topic....
>
> I need to be able to find all occurences of the string "{0, '\0'}" from
> many files. Within the files these are entries such as;
>
> VARCHAR GmtDay1[LEN_DATE] = {0,'\0'};
> VARCHAR GmtDay2[LEN_DATE] = {0,'\0'};
>
> I have been successfully been using 'find' with it's numerous swiches and
> getting find to call 'grep'. I have been trying to use grep to pick up the
> "{0, '\0'}" string. However, grep seems to interpret the '\' and the '{',
> '}' as special characters. Can anyone please tell me how I de-limit these
so
> that I can pull out rows that satisfy this criteria from a file.

ANSWER
========

   grep -F "{0,'\0'}"

or

   fgrep "{0,'\0'}"


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Received on Tue Jul 30 2002 - 05:10:07 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:43 NZDT