Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!njin!princeton!burst.Princeton.EDU!pfalstad From: pfalstad@burst.Princeton.EDU (Paul Falstad) Newsgroups: comp.unix.questions Subject: Re: How to place a comma in 'a{b,c,d}e' metanotation Message-ID: <5665@idunno.Princeton.EDU> Date: 24 Jan 91 19:48:46 GMT References: <4890@umbc3.UMBC.EDU> Sender: news@idunno.Princeton.EDU Organization: The E. Henry Thripshaw Fan Club Lines: 32 rouben@math9.math.umbc.edu () wrote: >The csh man page explains how the metanotation "a{b,c,d}e" expands into >"abe ace ade". What it does not explain is how to place commas in the >output, if necessary. For instance I wish that the construction >"a{b\,,c\,,d}" would expand to the comma separated list "ab, ac, ad", >but it actually expands to "ab a ac a ad". I guess I do not know how >to escape the ',' character in these constructions. Does anyone know how? Apparently this is a bug in some versions of csh. Our version (SunOS) appears to have it fixed, but our version of tcsh (we don't have SunOS source for csh) does not. Apparently it can be fixed simply by commenting out this line in sh.glob.c: case ','|QUOTE: This is line 350 in my version of tcsh. (Just grep for ','|QUOTE, there's only one line remotely like that.) Unless I'm stupid, there's no reason for that line to be there. The code looks like: case ','|QUOTE: case ',': ... do the brace expansion ... It looks like the author(s) went to extra effort to make , unquoteable. Am I missing something or is it just a mistake? -- Paul Falstad, pfalstad@phoenix.princeton.edu PLink:HYPNOS GEnie:P.FALSTAD "And she's always on about men following her. I don't know what she thinks they're going to do to her. Vomit on her, Basil, says."-Flowery Twats