From owner-cvs-all Fri Jun 14 9:47:24 2002 Delivered-To: cvs-all@freebsd.org Received: from mail.musha.org (daemon.musha.org [218.44.187.2]) by hub.freebsd.org (Postfix) with ESMTP id E982637B40A; Fri, 14 Jun 2002 09:47:16 -0700 (PDT) Received: from archon.local.idaemons.org (archon.local.idaemons.org [192.168.1.32]) by mail.musha.org (Postfix) with ESMTP id 980764D995; Sat, 15 Jun 2002 01:47:15 +0900 (JST) Date: Sat, 15 Jun 2002 01:47:17 +0900 Message-ID: <86k7p16c4q.wl@archon.local.idaemons.org> From: "Akinori MUSHA" To: Trevor Johnson Cc: Mikhail Teterin , Pete Fritchman , , Maxim Sobolev , , , Subject: Re: cvs commit: ports/Mk bsd.port.mk In-Reply-To: <20020614113752.K11520-100000@blues.jpj.net> References: <200206141102.50292.mi+mx@aldan.algebra.com> <20020614113752.K11520-100000@blues.jpj.net> User-Agent: Wanderlust/2.9.13 (Unchained Melody) SEMI/1.14.4 (Hosorogi) LIMIT/1.14.7 (Fujiidera) APEL/10.3 MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386--freebsd) Organization: Associated I. Daemons X-PGP-Public-Key: finger knu@FreeBSD.org X-PGP-Fingerprint: 081D 099C 1705 861D 4B70 B04A 920B EFC7 9FD9 E1EE MIME-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII 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 At Fri, 14 Jun 2002 11:49:51 -0400 (EDT), Trevor Johnson wrote: > Mikhail Teterin wrote: > > > But the macro could be implemented without using the -i option -- > > mktemp(1) is with us since FreeBSD-2.2.7... > > That sounds like the best idea. I don't know how to write such a macro > though. Would you mind writing it? How about writing inplace(1) instead? It should be generally useful because you can use any filter command such as sed(1), awk(1), grep(1), sort(1), uniq(1), and so on with it. The name and the sinopsis would be a matter of controversy, though. NAME inplace - processes a file through a filter command inplace SYNOPSIS [I can think of several options] 1) inplace file command [args ...] (just one file at a time) 2) inplace 'command [args ...]' files ... 3) inplace command [args ...] ';' files ... DESCRIPTION Invokes something similar to: command args ... < file > temp && mv temp file or if there is a '{}'in args: command args ... file ... > temp && mv temp file (Of course file modes shall be copied) -- / /__ __ Akinori.org / MUSHA.org / ) ) ) ) / FreeBSD.org / Ruby-lang.org Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp "Somewhere out of a memory.. of lighted streets on quiet nights.." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message