From owner-freebsd-questions Sun Oct 13 10:40:26 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA27507 for questions-outgoing; Sun, 13 Oct 1996 10:40:26 -0700 (PDT) Received: from gluon.mep.ruhr-uni-bochum.de (gluon.mep.ruhr-uni-bochum.de [134.147.160.165]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id KAA27213 for ; Sun, 13 Oct 1996 10:36:19 -0700 (PDT) Received: (from roberte@localhost) by gluon.mep.ruhr-uni-bochum.de (8.6.12/8.6.12) id TAA06103; Sun, 13 Oct 1996 19:35:49 +0200 From: Robert Eckardt Message-Id: <199610131735.TAA06103@gluon.mep.ruhr-uni-bochum.de> Subject: Re: find In-Reply-To: from hmmm at "13. Oct. 96 16:22:50" To: hmmm@alaska.net (hmmm) Date: Sun, 13 Oct 1996 19:35:49 +0200 (MET DST) Cc: questions@freebsd.org X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > ok - as usual, i'm part right, part wrong. > > here's the scoop after testing further suggestions ... > > oh - and his is with SH, i want to get good with it before > i move on to better shells .... > > the quotes help, but it STILL works different > in different directories ??? I don't see this. `find / -name "ispell*"' gives the same results (as I see from your output below) in either directory. The fact that `find / -name ispell*' works differently can be explained by the fact that sh expands `ispell*' to `ispell.1.gz' when you are in /usr/local/man/man1, but cannot be expanded, because there is nothing to match, when you are in the one above. Thus, sh passes `ispell*' unmodified to find *as if* it was quoted. (Other shells may give you an error.) As opposed to DOS, in Unix the shell expands wildcards unless they are quoted *before* passing them as arguments to the program. I hope this explains the behaviour you see to you. Robert > .......................................................... > > cd /usr/local/man/man1 > > find / -name ispell > /usr/local/bin/ispell > > find / -name ispell* > /usr/local/man/man1/ispell.1.gz > /usr/local/man/cat1/ispell.1.gz > > find / -name "ispell*" > /dos/bsd/packages/all/ispell-3.1.2 > /usr/local/bin/ispell > /usr/local/man/man1/ispell.1.gz > /usr/local/man/cat1/ispell.1.gz > /usr/local/man/man4/ispell.4.gz > /usr/local/share/emacs/site-lisp/ispell.el > /usr/local/share/emacs/site-lisp/ispell.elc > /usr/packages/All/ispell-3.1.20.tgz > /var/db/pkg/ispell-3.1.20 > > cd .. > > find / -name ispell > /usr/local/bin/ispell > > find / -name ispell* > /dos/bsd/packages/all/ispell-3.1.2 > /usr/local/bin/ispell > /usr/local/man/man1/ispell.1.gz > /usr/local/man/cat1/ispell.1.gz > /usr/local/man/man4/ispell.4.gz > /usr/local/share/emacs/site-lisp/ispell.el > /usr/local/share/emacs/site-lisp/ispell.elc > /usr/packages/All/ispell-3.1.20.tgz > /var/db/pkg/ispell-3.1.20 > > find / -name "ispell*" > /dos/bsd/packages/all/ispell-3.1.2 > /usr/local/bin/ispell > /usr/local/man/man1/ispell.1.gz > /usr/local/man/cat1/ispell.1.gz > /usr/local/man/man4/ispell.4.gz > /usr/local/share/emacs/site-lisp/ispell.el > /usr/local/share/emacs/site-lisp/ispell.elc > /usr/packages/All/ispell-3.1.20.tgz > /var/db/pkg/ispell-3.1.20 -- Robert Eckardt ( Ruhr-Universitaet Bochum, Inst.f.Theor.Physik, NB6/169 ) Universitaetsstrasse 150, D-44780 Bochum, Germany ----X---8---- Telefon: +49 234 700-3709, Telefax: +49 234 7094-574 8 E-Mail: RobertE@MEP.Ruhr-Uni-Bochum.de --------8---- URL: http://WWW.MEP.Ruhr-Uni-Bochum.de/~roberte >>> To be successful one needs friends, <<< >>> To be very successful one needs enemies. <<<