[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Beginner help request
From: |
Andrew Suffield |
Subject: |
Re: [Gnu-arch-users] Beginner help request |
Date: |
Sun, 11 Jan 2004 14:51:15 +0000 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
On Sat, Jan 10, 2004 at 08:49:40PM -0800, Tom Lord wrote:
> > From: Dustin Sallings <address@hidden>
>
> > On Jan 10, 2004, at 15:52, Tom Lord wrote:
>
> > > Typically, if there are no files matching *.php, then the shell will
> > > expand that to "*.php". I'm not sure off the top of my head if that
> > > is standard posix behavior for a shell (I think it is but wouldn't
> > > swear to it) -- I'd suggest looking for the sh spec on something like
> > > the opengroup web site if you are curious.
>
> > tcsh produces an error when all globs on a commandline fail to
> expand
> > to anything. It seems to be a good interactive behavior.
>
> Oh, I agree with that. Not just interactive -- I can't see any
> circumstance in which I'd really _want_ anything different. My guess
> would be that, sadly, the "'*.foo' with no matching files expands to
> *.foo" behavior was originally intended as a _feature_ for interactive
> use. Isn't that weird?
Not a very good guess. Think ssh, rsync, etc. If the glob doesn't
expand locally, it has another shot at being expanded remotely, so
"ssh foo ls *.c" and "rsync -a foo:tmp/* ." will actually work without
needing careful quoting.
bash at least allows you to turn off this behaviour with the nullglob
option, so that "*.c" will expand to "" if nothing matches (empty
string, not no string, and commands are expected to behave suitably if
they receive an empty argument - which tla add does not, and I'm
pretty sure that's a bug). I'd expect any interactive bourne shell to
provide similar options.
--
.''`. ** Debian GNU/Linux ** | Andrew Suffield
: :' : http://www.debian.org/ |
`. `' |
`- -><- |
signature.asc
Description: Digital signature
- Re: [Gnu-arch-users] Beginner help request, (continued)
- Re: [Gnu-arch-users] Beginner help request, Tom Lord, 2004/01/10
- Re: [Gnu-arch-users] Beginner help request, Florian Weimer, 2004/01/10
- Re: [Gnu-arch-users] Beginner help request, Oliver Crow, 2004/01/10
- Re: [Gnu-arch-users] Beginner help request, Tom Lord, 2004/01/10
- Re: [Gnu-arch-users] Beginner help request, Dustin Sallings, 2004/01/11
- Re: [Gnu-arch-users] Beginner help request, Tom Lord, 2004/01/11
- [Gnu-arch-users] shell globbing (was Re: Beginner help request), Adam Spiers, 2004/01/11
- Re: [Gnu-arch-users] shell globbing (was Re: Beginner help request), Florian Weimer, 2004/01/11
- Re: [Gnu-arch-users] shell globbing (was Re: Beginner help request), Adam Spiers, 2004/01/11
- Re: [Gnu-arch-users] Beginner help request,
Andrew Suffield <=
- Re: [Gnu-arch-users] Beginner help request, Tom Lord, 2004/01/11
- Re: [Gnu-arch-users] Beginner help request, Dustin Sallings, 2004/01/11
- [Gnu-arch-users] Re: Beginner help request, Stig Brautaset, 2004/01/10
Re: [Gnu-arch-users] Beginner help request, Brian May, 2004/01/11