]>
Commit | Line | Data |
---|---|---|
3185942a JA |
1 | abmnopyz |
2 | abmnopyz | |
3 | ab | |
4 | ||
5 | ||
8868edaf | 6 | abcd |
3185942a | 7 | abcd |
4491c030 CR |
8 | mnop |
9 | qrst | |
3185942a JA |
10 | sh_352.26ax |
11 | sh_352.26ay | |
12 | sh_352.25a sh_352.25b | |
13 | sh_352.27 ) ) ) | |
14 | abc | |
4491c030 | 15 | def |
3185942a JA |
16 | here doc with ) |
17 | ) | |
18 | bad' syntax | |
19 | a | |
20 | sh_352.26a | |
21 | sh_352.26a | |
22 | sh_352.26 | |
23 | sh_352.26 | |
24 | sh_352.26 | |
25 | 1 | |
26 | sh_352.28 ) | |
27 | sh_352.28 ) | |
28 | k | |
29 | abcd | |
30 | ab | |
31 | ab | |
32 | abcde | |
33 | ||
34 | argv[1] = <abcde^J > | |
35 | abcdefoo | |
36 | argv[1] = <abcde> | |
37 | argv[2] = <foo> | |
38 | argv[1] = <wxabcdeyz> | |
39 | argv[1] = <abcde> | |
40 | ' | |
41 | after 1 | |
42 | ' | |
43 | after 2 | |
44 | ' | |
45 | after 3 | |
46 | ` | |
47 | after 4 | |
48 | hello | |
49 | after 5 | |
50 | ' | |
51 | after 6 | |
52 | x | |
53 | x | |
8868edaf | 54 | x |
3185942a JA |
55 | quoted ) |
56 | comment | |
57 | here-doc with ) | |
8868edaf | 58 | here-doc with \() |
3185942a JA |
59 | here-doc terminated with a parenthesis |
60 | ' # or a single back- or doublequote | |
8868edaf | 61 | line terminated with a backslash |
4491c030 CR |
62 | ./comsub-posix1.sub: line 1: syntax error near unexpected token `)' |
63 | ./comsub-posix1.sub: line 1: `echo $( if x; then echo foo )' | |
495aee44 CR |
64 | swap32_posix is a function |
65 | swap32_posix () | |
66 | { | |
67 | local funcname=swap32_posix; | |
68 | local arg; | |
69 | for arg in "$@"; | |
70 | do | |
71 | echo $(( | |
72 | ($arg & 4278190080) >> 24 | | |
73 | ($arg & 16711680) >> 8 | | |
74 | ($arg & 65280) << 8 | | |
75 | ($arg & 255) << 24 | |
76 | )); | |
77 | done | |
78 | } | |
6c1407d2 CR |
79 | bash: -c: line 1: syntax error near unexpected token `done' |
80 | bash: -c: line 1: `: $(case x in x) ;; x) done esac)' | |
81 | bash: -c: line 1: syntax error near unexpected token `done' | |
82 | bash: -c: line 1: `: $(case x in x) ;; x) done ;; esac)' | |
83 | bash: -c: line 1: syntax error near unexpected token `esac' | |
84 | bash: -c: line 1: `: $(case x in x) (esac) esac)' | |
4491c030 CR |
85 | bash: -c: line 1: syntax error near unexpected token `in' |
86 | bash: -c: line 1: `: $(case x in esac|in) foo;; esac)' | |
87 | bash: -c: line 1: syntax error near unexpected token `done' | |
88 | bash: -c: line 1: `: $(case x in x) ;; x) done)' | |
6c1407d2 CR |
89 | case: -c: line 3: syntax error near unexpected token `esac' |
90 | case: -c: line 3: `$( esac ; bar=foo ; echo "$bar")) echo bad 2;;' | |
91 | ok 2 | |
92 | inside outside | |
93 | ok 3 | |
94 | syntax-error: -c: line 2: syntax error near unexpected token `done' | |
95 | syntax-error: -c: line 2: `: $(case x in x) ;; x) done ;; esac)' | |
495aee44 | 96 | yes |
4491c030 CR |
97 | |
98 | ||
99 | ||
a0c0a00f | 100 | ab cde |