From owner-freebsd-questions@FreeBSD.ORG Mon Jul 7 19:56:37 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B39C9537 for ; Mon, 7 Jul 2014 19:56:37 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DC7B2AAC for ; Mon, 7 Jul 2014 19:56:37 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id s67JuZdd090346 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 7 Jul 2014 13:56:35 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id s67JuWLm090343; Mon, 7 Jul 2014 13:56:34 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 7 Jul 2014 13:56:32 -0600 (MDT) From: Warren Block To: Arthur Chance Subject: Re: [Bulk] Re: The name "grep" In-Reply-To: <53BAD236.3060501@qeng-ho.org> Message-ID: References: <20140707075443.d47ca06a.freebsd@edvax.de> <53BA4F77.60907@qeng-ho.org> <20140707104403.5a0694ff.freebsd@edvax.de> <53BA71A7.9040208@qeng-ho.org> <1404728392.19389.1.camel@archlinux> <53BA9EC0.9000201@qeng-ho.org> <20140707160528.7ecf9855.freebsd@edvax.de> <1404750481.19389.12.camel@archlinux> <53BAD236.3060501@qeng-ho.org> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Mon, 07 Jul 2014 13:56:35 -0600 (MDT) Cc: Ralf Mardorf , freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 19:56:37 -0000 On Mon, 7 Jul 2014, Arthur Chance wrote: > On 07/07/2014 17:28, Ralf Mardorf wrote: >> >>> On Mon, 07 Jul 2014 14:21:04 +0100, Arthur Chance wrote: >>>> dd [options] [ infile [ outfile ]] >> >> This way users by accident could mistake the infile with the outfile. >> >> We dislike to randomly screw up infile and outfile, so IMO it makes >> sense to force if= and of= "operands". > > There's no problem about which file is input and which output with cp or mv, > so why on earth would it be a problem with a sane version of dd? > > If you really need a hand holding indication of which file is which, > > dd -i $infile -o $outfile > > would be in the Unix spirit, unlike the existing form. And with an > interactive shell you could use filename completion which fails with the > existing dd. There's an ongoing thread in the forums about csh completions. dd is one of them: complete dd 'c/if=/f/' 'c/of=/f/' \ 'c/conv=*,/(ascii block ebcdic lcase pareven noerror notrunc osync sparse swab sync unblock)/,' \ 'c/conv=/(ascii block ebcdic lcase pareven noerror notrunc osync sparse swab sync unblock)/,' \ 'p/*/(bs cbs count files fillcahr ibs if iseek obs of oseek seek skip conv)/=' There is no reason a wrapper script could not be written for dd. It's probably about twenty years too late to popularize a different format, though.