From owner-cvs-all Tue May 7 11:32:36 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 181F737B404; Tue, 7 May 2002 11:32:19 -0700 (PDT) Received: (from jmallett@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g47IWJO26790; Tue, 7 May 2002 11:32:19 -0700 (PDT) (envelope-from jmallett) Message-Id: <200205071832.g47IWJO26790@freefall.freebsd.org> From: "J. Mallett" Date: Tue, 7 May 2002 11:32:18 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/sed main.c sed.1 X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG jmallett 2002/05/07 11:32:18 PDT Modified files: usr.bin/sed main.c sed.1 Log: Add a -i option to sed(1) to do inplace editing, to give us an alternative to Perl for such things. The key difference to Perl is that a backup extension *MUST* be specified, because on one hand it isn't recommended to have options which optionally take a parameter, and on the other hand, it'd be slightly unpleasent to implement proper handling for that. The difference between this and the version posted to developers@ is that it does handle multiple files in argv after the getopt(3) handling "correctly", in that the inplace editing-specific code has been moved out to a function, and that function is used beyond the first file in our linked list. This option has been documented as FreeBSD-specific in the manpage. Reviewed by: developers@ (got feedback from: des, fanf, sobomax, roberto, obrien) MFC after: 1 week Revision Changes Path 1.16 +66 -2 src/usr.bin/sed/main.c 1.21 +11 -1 src/usr.bin/sed/sed.1 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message