From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Butler, Mathew" Newsgroups: gmane.os.tru64.managers Subject: SUMMARY : grep commands??? Date: Tue, 30 Jul 2002 15:09:19 +1000 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <733D8705A187D511B62300B0D0D15C828ACE73@swires.au.logica.com> NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1028005790 27023 127.0.0.1 (30 Jul 2002 05:09:50 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 30 Jul 2002 05:09:50 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.33 #1 (Debian)) id 17ZPGS-00071C-00 for ; Tue, 30 Jul 2002 07:09:45 +0200 Original-Received: (qmail 29726 invoked by uid 5); 30 Jul 2002 05:10:01 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 29718 invoked from network); 30 Jul 2002 05:10:00 -0000 Original-Received: from unknown (HELO emroute3.ornl.gov) (134.167.3.110) by 0 with SMTP; 30 Jul 2002 05:10:00 -0000 Original-Received: from emroute3.ornl.gov (localhost [127.0.0.1]) by emroute3.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0H0100LZIQCGD7@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 30 Jul 2002 01:10:00 -0400 (EDT) Original-Received: from mail4.messagelabs.com (mail4.messagelabs.com [212.125.75.12]) by emroute3.ornl.gov (PMDF V6.1-1 #39060) with SMTP id <0H010097GQC7S1@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 30 Jul 2002 01:09:44 -0400 (EDT) Original-Received: (qmail 3236 invoked from network); Tue, 30 Jul 2002 05:09:42 +0000 Original-Received: from porgy.logica.co.uk (158.234.250.67) by server-13.tower-4.messagelabs.com with SMTP; Tue, 30 Jul 2002 05:09:42 +0000 Original-Received: from pearcey.au.logica.com ([128.129.220.79]) by porgy.logica.co.uk (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id GAA24395 for ; Tue, 30 Jul 2002 06:09:41 +0100 Original-Received: by pearcey.au.logica.com with Internet Mail Service (5.5.2448.0) id ; Tue, 30 Jul 2002 15:09:38 +1000 Original-To: "Majordomo \(E-mail\)" X-Mailer: Internet Mail Service (5.5.2448.0) X-VirusChecked: Checked X-Authentication-warning: porgy.logica.co.uk: Host [128.129.220.79] claimed to be pearcey.au.logica.com Xref: main.gmane.org gmane.os.tru64.managers:1156 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:1156 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.