From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1LdxTH-0000xq-TR for garchives@archives.gentoo.org; Mon, 02 Mar 2009 02:01:32 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A35BFE028A; Mon, 2 Mar 2009 02:01:30 +0000 (UTC) Received: from mail1.optus.com.au (mail1.optus.com.au [203.13.126.129]) by pigeon.gentoo.org (Postfix) with ESMTP id 1F6F9E028A for ; Mon, 2 Mar 2009 02:01:30 +0000 (UTC) Received: from mail1.optus.com.au (unknown [127.0.0.1]) by IMSA (Postfix) with ESMTP id DFAC420F021 for ; Mon, 2 Mar 2009 13:01:26 +1100 (EST) Received: from chow2ke002.optus.com.au (unknown [161.43.32.103]) by mail1.optus.com.au (Postfix) with ESMTP id C7CC020F01C for ; Mon, 2 Mar 2009 13:01:26 +1100 (EST) Received: from chow2ke001.optus.com.au ([161.43.32.100]) by chow2ke002.optus.com.au with Microsoft SMTPSVC(6.0.3790.3959); Mon, 2 Mar 2009 13:01:16 +1100 Received: from excprdhubw002.optus.com.au ([10.10.36.116]) by chow2ke001.optus.com.au with Microsoft SMTPSVC(6.0.3790.3959); Mon, 2 Mar 2009 13:01:12 +1100 Received: from excprdmbxw002.optus.com.au ([10.8.36.30]) by excprdhubw002.optus.com.au ([10.10.36.116]) with mapi; Mon, 2 Mar 2009 13:01:11 +1100 From: Adam Carter To: "gentoo-user@lists.gentoo.org" Date: Mon, 2 Mar 2009 13:01:31 +1100 Subject: [gentoo-user] Grep question Thread-Topic: Grep question Thread-Index: Acma2s5DYtzEX/b3SPKF6k+Ifo5elQ== Message-ID: <5602B0BD6D59AE4791BE83104940118D7B1B328A@excprdmbxw002.optus.com.au> Accept-Language: en-US, en-AU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, en-AU Content-Type: multipart/alternative; boundary="_000_5602B0BD6D59AE4791BE83104940118D7B1B328Aexcprdmbxw002op_" Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 X-OriginalArrivalTime: 02 Mar 2009 02:01:12.0508 (UTC) FILETIME=[C330E7C0:01C99ADA] X-TM-AS-Product-Ver: IMSS-7.0.0.3091-5.6.0.1016-16494.003 X-TM-AS-User-Approved-Sender: No X-TM-AS-Result-Xfilter: Match text exemption rules:Yes X-Archives-Salt: 369666dd-e656-4b05-8982-14135bfecfcb X-Archives-Hash: f760d231e47c2df89f1672bfec4e35c5 --_000_5602B0BD6D59AE4791BE83104940118D7B1B328Aexcprdmbxw002op_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I need to select all the lines between string1 and string2 in a file. Strin= g1 exists on an entire line by itself and string2 will be at the start of a= line. What's the syntax? I cant use -A as there is a variable number of li= nes. Thanks. --_000_5602B0BD6D59AE4791BE83104940118D7B1B328Aexcprdmbxw002op_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
I need to= select all=20 the lines between string1 and string2 in a file. String1 exists on an entir= e=20 line by itself and string2 will be at the start of a line. What's the synta= x? I=20 cant use -A as there is a variable number of lines.
 
Thanks.
 
--_000_5602B0BD6D59AE4791BE83104940118D7B1B328Aexcprdmbxw002op_--