From owner-freebsd-questions Mon Dec 2 4:43:25 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F05B437B401 for ; Mon, 2 Dec 2002 04:43:23 -0800 (PST) Received: from ispsnet.net (smtp1.ispsnet.net [64.63.192.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5592243E4A for ; Mon, 2 Dec 2002 04:43:23 -0800 (PST) (envelope-from alanday@aaahawk.com) Received: from a ([65.58.85.89]) by ispsnet.net ; Mon, 02 Dec 2002 07:51:30 -0500 Message-ID: <001a01c29a00$74813ee0$7800000a@a> From: "Alan Day" To: =?iso-8859-9?Q?Malik_B=FClent?= , References: <012401c299fc$ed221f80$dc96eed5@ymmaslak> Subject: Re: is there a "replace command" ? Date: Mon, 2 Dec 2002 07:43:44 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-9" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4920.2300 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG sed -e 's/touch/rm/' FILENAME > OUTPUT_FILE or something like, perl -pi -e 's/touch/rm/;' FILENAME man 1 sed for a lot more detail ----- Original Message ----- From: "Malik Bülent" To: Sent: Monday, December 02, 2002 7:18 AM Subject: is there a "replace command" ? > On Freebsd4.x > I have a file. I want to change some expressions with new ones > For example a file > touch /var/qmail/1 > touch /var/qmail/2 > touch /var/qmail/3 > touch /var/qmail/4 > touch /var/qmail/5 > touch /var/qmail/6 > I want to change "touch" with "rm" > How can i replace a newones in stead of a lot of expressions in a file on > FreeBSD ? > Which command(s) do i have to use ? > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message