init version.
[bush.git] / tests.bak / comsub-posix.right
blob9aebb8482841677242a38d4ec3e7a2e5201e3d31
1 abmnopyz
2 abmnopyz
3 ab
6 abcd
7 abcd
8 sh_352.26ax
9 sh_352.26ay
10 sh_352.25a sh_352.25b
11 sh_352.27 ) ) )
12 abc
13 here doc with )
15 bad' syntax
17 sh_352.26a
18 sh_352.26a
19 sh_352.26
20 sh_352.26
21 sh_352.26
23 sh_352.28 )
24 sh_352.28 )
26 abcd
29 abcde
31 argv[1] = <abcde^J  >
32 abcdefoo
33 argv[1] = <abcde>
34 argv[2] = <foo>
35 argv[1] = <wxabcdeyz>
36 argv[1] = <abcde>
38 after 1
40 after 2
42 after 3
44 after 4
45 hello
46 after 5
48 after 6
52 quoted )
53 comment
54 here-doc with )
55 here-doc with \()
56 here-doc terminated with a parenthesis
57 ' # or a single back- or doublequote
58 line terminated with a backslash
59 ./comsub-posix1.sub: command substitution: line 2: syntax error near unexpected token `)'
60 ./comsub-posix1.sub: command substitution: line 2: ` if x; then echo foo )'
61 after
62 swap32_posix is a function
63 swap32_posix () 
64
65     local funcname=swap32_posix;
66     local arg;
67     for arg in "$@";
68     do
69         echo $((
70                         ($arg & 4278190080) >> 24 |
71                         ($arg & 16711680) >> 8 |
72                         ($arg & 65280) << 8 |
73                         ($arg & 255) << 24
74                 ));
75     done
77 yes
78 ab cde