Path: csiph.com!au2pb.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 29 Nov 2015 13:49:51 -0600 Newsgroups: comp.os.linux.misc,alt.os.linux.debian,alt.os.linux.slackware Subject: Re: mc finds more than `find` finds? References: <87y4dh7sol.fld@barrow.com> From: floyd@apaflo.com (Floyd L. Davidson) Organization: __________ Date: Sun, 29 Nov 2015 10:49:44 -0900 Message-ID: <87lh9g7fhj.fld@barrow.com> User-Agent: gnus 5.10.6/XEmacs 21.4.15/Linux 2.6.19 Cancel-Lock: sha1:EgyPQfIGML3VYCLqF6IdpgogZW8= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 57 X-Trace: sv3-A9XB00kt/r3XhxeKl9LIXQZ6xACxg0uoZRa/b7x68t7K5K2a5HsN7FEPc//cKZbWXGTcaTiZrdQ1FiR!2vS1m3/8zCsjAZFPAXdBhfRbMgOHNPlAhBLaL/qZQ3SUrNT59yjcliz4xokB7Q== X-Complaints-To: www.supernews.com/docs/abuse.html X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3206 X-Received-Bytes: 3318 X-Received-Body-CRC: 4033276551 Xref: csiph.com comp.os.linux.misc:16392 alt.os.linux.debian:7430 alt.os.linux.slackware:25856 Martijn Dekker wrote: >In article <87y4dh7sol.fld@barrow.com>, > floyd@apaflo.com (Floyd L. Davidson) wrote: > >> Both opening and closing braces are reserved words. > >Yes, '{' and '}' are reserved words, but '{}' is not a reserved word. >(Something can only be a "word" if it's separated by blanks.) > >In any case the concept of a reserved word doesn't apply to command >arguments, so it's moot. You have removed and then changed the context to which my statement applied. The point is still very simple: braces are reserved words. They do get "interpreted", and the statement I replied to incorrectly said they don't. Your definition of "word" is parochial, and does not necessarily apply to use of that term in a shell. From the bash man page: word A sequence of characters considered as a single unit by the shell. Also known as a token. Clearly '{}' is a pair of tokens to the parsing engine. In some contexts they each cause a "word break", and in other contexts they do not. When used to delimit a list they do not cause a break and must be surrounded by spaces. When interpreted for expansion there is no need for a space. >> Try this: >> >> $ echo "Now "{'is','is not'}" the time." >> >> Or something simple, >> >> $ echo a{b,c,d}e > >This is brace expansion, which is a non-standard[*] extension to >globbing. It's completely distinct from the reserved words '{' and '}' >which are for delimiting code blocks. Brace expansion has not been standardized, but it is in almost all major shells. It needs to be understood by a shell programmer. >[*] Brace expansion is supported by bash, *ksh and zsh but not by >standard sh implementations such as dash or yash. > >- M. -- Floyd L. Davidson http://www.apaflo.com/ Ukpeagvik (Barrow, Alaska) floyd@apaflo.com