Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!uunet!cme!durer!clark From: clark@cme.nist.gov (Steve Clark) Newsgroups: comp.unix.questions Subject: Re: How to place a comma in 'a{b,c,d}e' metanotation Message-ID: Date: 24 Jan 91 20:51:32 GMT References: <4890@umbc3.UMBC.EDU> Sender: news@cme.nist.gov Organization: National Institute of Standards and Technology Lines: 30 In-reply-to: rouben@math9.math.umbc.edu's message of 24 Jan 91 17:29:18 GMT >>>>> On 24 Jan 91 17:29:18 GMT, rouben@math9.math.umbc.edu said: rouben> The problem (apparently) is that the shell handles escapes (and variable substitutions, unfortunately) before expanding these lists. If any escapes or variables produce commas, they will be interpreted as separators between the braces. So you need to force the shell to expand the braces before the commas show up. I don't see a solution with escapes: the comma would still have to be there right from the start. Instead, I'd use a variable (to hold the comma until the appropriate time) with eval (to stick in the comma(s) after the braces are expanded). rouben> ... ideally I would have liked to say: rouben> xset fp+ /path/{dir1\,,dir2\,,dir3} % set c=, % xset fp+ `eval echo /path/{dir1\$c,dir2\$c,dir3}` Which is only slightly longer :-) than the resulting command: rouben> xset fp+ /path/dir1, /path/dir2, /path/dir3 -- -steve ------------------------------------------------------------------ Steve Clark National Institute for Standards and Technology (formerly NBS) clark@cme.nist.gov ..uunet!cme-durer!clark (301)975-3595 / 3544