From owner-freebsd-questions@FreeBSD.ORG Mon May 10 04:36:08 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A1131065670 for ; Mon, 10 May 2010 04:36:08 +0000 (UTC) (envelope-from fbsd1@a1poweruser.com) Received: from mail-03.name-services.com (mail-03.name-services.com [69.64.155.195]) by mx1.freebsd.org (Postfix) with ESMTP id DAF508FC1F for ; Mon, 10 May 2010 04:36:07 +0000 (UTC) Received: from [10.0.10.3] ([202.69.173.106]) by mail-03.name-services.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 9 May 2010 21:36:07 -0700 Message-ID: <4BE78D36.6020004@a1poweruser.com> Date: Mon, 10 May 2010 12:36:06 +0800 From: Fbsd1 User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Sahil Tandon References: <4BE77FB1.2050607@a1poweruser.com> <4BE7869B.1060406@a1poweruser.com> <20100510042411.GD32627@magic.hamla.org> In-Reply-To: <20100510042411.GD32627@magic.hamla.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 10 May 2010 04:36:07.0892 (UTC) FILETIME=[4EF37140:01CAEFFA] X-Sender: fbsd1@a1poweruser.com Cc: freebsd-questions@freebsd.org Subject: Re: how to find literal in file and them delete that line 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: Mon, 10 May 2010 04:36:08 -0000 Sahil Tandon wrote: > On Mon, 10 May 2010, Fbsd1 wrote: > >> Alberto Mijares wrote: >>> On Sun, May 9, 2010 at 11:08 PM, Fbsd1 wrote: >>>> I want to search every line in the specified file for a literal and if found >>>> then delete that line from the file and save the file all from within a sh >>>> type of shell script. >>> man(1) sed >>> >> That makes no sense to me. >> need example > > What makes no sense? The sed(1) man page? Which section in particular > is confusing? And please, explain the rationale for making your port > automatically edit /etc/rc.conf. > editing /etc/rc.conf was just given as a example for the post. Yes the whole man sed reads like Greek. For a neophyte programmer I can not even begin to comprehend what its saying. That man page needs examples of use. You have forgotten that those man pages are for reference for people who all ready know how to use it. Its not intended for novices. So yes it's useless to me.