Subj : Re: Wildcards [] {} To : comp.os.linux From : Sybren Stuvel Date : Sun Jul 11 2004 01:04 pm Magnus Jonneryd enlightened us with: > I'm wondering what's the difference between the wildcards [] and {}? foo[bar] expands to "foob fooa foor", but only if those file exist. For example, if only foob and fooa exist, it expands to "foob fooa". If none of the files exist, the pattern is left in place. foo{bar,bob} expands to "foobar foobob", no matter which of the files exist. > For example i was trying to create a number of files by using touch: > touch file[1,2,3], and got a file named file[1,2,3]. See notes above. This would match "file1 file, file2 file3" instead of what you want. Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself? .