source: vendor/bash/3.1-p17/tests/braces.tests

Last change on this file was 3228, checked in by bird, 18 years ago

bash 3.1

File size: 966 bytes
Line 
1echo ff{c,b,a}
2echo f{d,e,f}g
3echo {l,n,m}xyz
4echo {abc\,def}
5echo {abc}
6
7echo \{a,b,c,d,e}
8echo {x,y,\{a,b,c}}
9echo {x\,y,\{abc\},trie}
10
11echo /usr/{ucb/{ex,edit},lib/{ex,how_ex}}
12
13echo XXXX\{`echo a b c | tr ' ' ','`\}
14eval echo XXXX\{`echo a b c | tr ' ' ','`\}
15
16echo {}
17echo { }
18echo }
19echo {
20echo abcd{efgh
21
22echo foo {1,2} bar
23echo `zecho foo {1,2} bar`
24echo $(zecho foo {1,2} bar)
25
26var=baz
27varx=vx
28vary=vy
29
30echo foo{bar,${var}.}
31echo foo{bar,${var}}
32
33echo "${var}"{x,y}
34echo $var{x,y}
35echo ${var}{x,y}
36
37unset var varx vary
38
39# new sequence brace operators
40echo {1..10}
41
42# this doesn't work yet
43echo {0..10,braces}
44# but this does
45echo {{0..10},braces}
46echo x{{0..10},braces}y
47
48echo {3..3}
49echo x{3..3}y
50echo {10..1}
51echo {10..1}y
52echo x{10..1}y
53
54echo {a..f}
55echo {f..a}
56
57echo {a..A}
58echo {A..a}
59
60echo {f..f}
61
62# mixes are incorrectly-formed brace expansions
63echo {1..f}
64echo {f..1}
65
66echo 0{1..9} {10..20}
67
68# do negative numbers work?
69echo {-1..-10}
70echo {-20..0}
Note: See TracBrowser for help on using the repository browser.