From owner-freebsd-questions@FreeBSD.ORG Tue Jul 8 00:31:30 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 BE43CE11 for ; Tue, 8 Jul 2014 00:31:30 +0000 (UTC) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EBFA2240 for ; Tue, 8 Jul 2014 00:31:30 +0000 (UTC) Received: from r56.edvax.de (port-92-195-69-249.dynamic.qsc.de [92.195.69.249]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 5E15524D75; Tue, 8 Jul 2014 02:31:26 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s680VPpY002011; Tue, 8 Jul 2014 02:31:25 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Tue, 8 Jul 2014 02:31:25 +0200 From: Polytropon To: Ralf Mardorf Subject: Re: [Bulk] Re: The name "grep" Message-Id: <20140708023125.f6b56faa.freebsd@edvax.de> In-Reply-To: <1404750481.19389.12.camel@archlinux> 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> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: 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: Tue, 08 Jul 2014 00:31:30 -0000 On Mon, 07 Jul 2014 18:28:01 +0200, 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". Because "man dd" says: The dd utility copies the standard input to the standard output. Those are the "files" being used when no options are provided. To override those defaults, if= and of= have to be supplied. It would be comparable to having a -i and -o option (or like many other programs do when _not_ using the defaults: -f, whereas the default is usually program-specific, e. g. tar's default is /dev/sa0, or $TAPE, if set). Additionally, the form "command infile(s) outfile" is also found in programs like cp or mv (or even ln), which do not require a specific option for defining what is input and what is output. Unlike JCL keyword parameters, we see positional parameters here, which urges us to differentiate OS/JCL from DOS/JCL at the next seizure of nostalgia. ;-) However, dd is one of the few programs that causes touble with traditional autocompleting shells, because '=' is a valid character for use within file names, whereas ' ' (space) is the standard delimiter character. % dd if=/dev/d[TAB] if=/dev/ not found % dd if=/dev/_ More intelligent shells however can deal with this. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...