Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

/bin/sh help needed



The shell expands all wildcards unless escaped or single quoted. That is 
why you need to escape finds:
find . -name foo.\* 
find . -name 'foo.*'

Using both quotes and escapes may be necessary. Then you have file system 
wildcards like *, sets, and ? (expanded by the shells) and regular 
expressions which have different rules. 

On 24 Apr 2002 at 10:50, David Kramer wrote:

> On Tue, 23 Apr 2002, Derek D. Martin wrote:
> 
> > At some point hitherto, David Kramer hath spake thusly:
> > > Every combination of single quotes, double quotes, and escaping seems to 
> > > either send it all as one argument, or send it all as separate arguments, 
> > > but each argument is quoted.
> > 
> > You seem to have overlooked the most simple solution: don't quote it
> > at all.  This should give you exactly what you want: a space separated
> > list of args.  The main reason for quotes is to preserve space or
> > change the default handling of metacharacters.  In this case, it
> > appears you don't want to do either.  So don't use quotes.
> 
> With no quoting at all, the wildcards get expanded to files, and I need to 
> pass the wildcards to the program, not the matching files.
> 
> ----------------------------------------------------------------------------
> DDDD   David Kramer         david at thekramers.net       http://thekramers.net
> DK KD  
> DKK D                  The internet is full.  Go away.
> DK KD  
> DDDD   
> 
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://www.blu.org/mailman/listinfo/discuss


--
Jerry Feldman <gaf at blu.org>
Associate Director
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org