From owner-freebsd-questions@FreeBSD.ORG Wed Aug 18 14:22:39 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB0981065679 for ; Wed, 18 Aug 2010 14:22:39 +0000 (UTC) (envelope-from jacks@sage-american.com) Received: from mail.sagedata.net (mail.sagedata.net [38.106.15.121]) by mx1.freebsd.org (Postfix) with ESMTP id A86AB8FC15 for ; Wed, 18 Aug 2010 14:22:39 +0000 (UTC) Received: from sagemaster (sageweb.net [65.68.247.73]) by mail.sagedata.net (8.14.4/8.14.4) with SMTP id o7IEMcNG053289; Wed, 18 Aug 2010 09:22:39 -0500 (CDT) (envelope-from jacks@sage-american.com) X-Authentication-Warning: mail.sagedata.net: Host sageweb.net [65.68.247.73] claimed to be sagemaster Message-Id: <3.0.1.32.20100818092237.00ecef30@sage-american.com> X-Sender: jacks@sage-american.com X-Mailer: Windows Eudora Pro Version 3.0.1 (32) Date: Wed, 18 Aug 2010 09:22:37 -0500 To: "A. Wright" From: "Jack L. Stone" In-Reply-To: References: <3.0.1.32.20100818084231.00ecef30@sage-american.com> <3.0.1.32.20100818084231.00ecef30@sage-american.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Scanned-By: milter-spamc/1.15.388 (mail.sagedata.net [38.106.15.121]); Wed, 18 Aug 2010 09:22:39 -0500 X-Scanned-By: milter-sender/1.16.915 (mail.sagedata.net [38.106.15.121]); Wed, 18 Aug 2010 09:22:39 -0500 X-Spam-Status: NO, hits=-10.00 required=4.50 X-Spam-Report: Content analysis details: (-10.0 points, 4.5 required) | | pts rule name description | ---- ---------------------- -------------------------------------------------- | -0.0 SHORTCIRCUIT Not all rules were run, due to a shortcircuited rule | -10 ALL_TRUSTED Passed through trusted hosts only via SMTP | Cc: "freebsd-questions@freebsd.org" Subject: Re: Extracting a variable listing X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2010 14:22:40 -0000 At 10:53 AM 8.18.2010 -0300, A. Wright wrote: >On Wed, 18 Aug 2010, Jack L. Stone wrote: > >> The content I need will always fall beneath a row of pound signs, and there >> is content above that row I don't want, like this: >> >> bunch of rows I don't need here >> ############################### <--- the top of stuff needed >> row1 > > >If you want the '#' line in the output > cat YourFile | sed -n -e '/#####/,$p' > >If you don't, then > cat YourFile | sed -e '1,/#####/d' > >The above assumes that you will have at least 5 '#' chars on >your divider line, and never before in the file. Increase the >number '#' symbols if the above example is strictly literal. >Note the -n in the first line. > >A. > Worked like a charm, Andrew! Just what I needed! Jack (^_^) Happy trails, Jack L. Stone System Admin Sage-american