Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15422

Re: Wrong command option in the manual examples

Path csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Robert Elz <kre@munnari.OZ.AU>
Newsgroups gnu.bash.bug
Subject Re: Wrong command option in the manual examples
Date Tue, 24 Sep 2019 12:28:02 +0700
Lines 30
Approved bug-bash@gnu.org
Message-ID <mailman.958.1569302944.2190.bug-bash@gnu.org> (permalink)
References <49989bf9-7c12-2670-de3f-20feead50a63@case.edu> <20190923145943.GX28751@eeg.ccf.org> <59cf49b0-1292-b752-4fe8-8928fd558ebf@iki.fi> <CAD0rTC6EHd5w5A6kuD850mLzu+V_EJXQyoZ=amQcF9TktTSEJA@mail.gmail.com> <38052651-6d67-6107-660c-707ca39ee00c@case.edu> <23726.1569247367@jinx.noi.kre.to> <16758.1569259485@jinx.noi.kre.to> <14125.1569302882@jinx.noi.kre.to>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace usenet.stanford.edu 1569302945 31325 209.51.188.17 (24 Sep 2019 05:29:05 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org
To chet.ramey@case.edu
Envelope-to bug-bash@gnu.org
In-Reply-To <49989bf9-7c12-2670-de3f-20feead50a63@case.edu>
X-detected-operating-system by eggs.gnu.org: GNU/Linux 3.x [generic]
X-Received-From 2001:3c8:9009:181::2
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <14125.1569302882@jinx.noi.kre.to>
X-Mailman-Original-References <49989bf9-7c12-2670-de3f-20feead50a63@case.edu> <20190923145943.GX28751@eeg.ccf.org> <59cf49b0-1292-b752-4fe8-8928fd558ebf@iki.fi> <CAD0rTC6EHd5w5A6kuD850mLzu+V_EJXQyoZ=amQcF9TktTSEJA@mail.gmail.com> <38052651-6d67-6107-660c-707ca39ee00c@case.edu> <23726.1569247367@jinx.noi.kre.to> <16758.1569259485@jinx.noi.kre.to>
Xref csiph.com gnu.bash.bug:15422

Show key headers only | View raw


    Date:        Mon, 23 Sep 2019 14:12:27 -0400
    From:        Chet Ramey <chet.ramey@case.edu>
    Message-ID:  <49989bf9-7c12-2670-de3f-20feead50a63@case.edu>

  | It's in SVR2 (1984?), at least,

Thanks.

  | The SVR2 page implies that it was added to support cpio.

Yes .. the function of the option is fine - when used while making the
archive the files get listed (and therefore added) first, and the directory
that contains them after all the files, which means that when extracted
the files can be written to their directory before the directory's permissions
are seen and set, perhaps denying writing.

What's wrong with it is making what is a global option act like it is an
expression primitive.   If it worked as an expression operator, you should
be able to do
	find . -name foo -depth -o -name bar -nodepth ...
but you can't, aside from there being no "nodepth" or anything equivalent,
the -depth option is set for the whole traversal, before the first
directory is read, it doesn't only turn on when the primitive is executed.

Find at the time had no options, so where they should have just
added one (or three) they instead did that "make it an operator" solution.

kre

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Wrong command option in the manual examples Robert Elz <kre@munnari.OZ.AU> - 2019-09-24 12:28 +0700

csiph-web