]>
Commit | Line | Data |
---|---|---|
0628567a JA |
1 | # quoted null problems in versions of bash prior to 3.2 |
2 | ||
3 | str='12' | |
4 | snul=$'\177' | |
5 | ||
6 | recho "${str:2}" | |
7 | recho "+${str:2}" | |
8 | recho "+${snul:0:1}" | |
9 | recho "+""${str:2}" | |
10 | ||
11 | recho "${str/?/$snul}" | |
12 | recho ${str/?/$snul} | |
13 | ||
14 | recho "${snul/x/y}" | |
15 | recho ${snul/x/y} | |
16 | ||
17 | recho "${snul/$snul/}" | |
18 | recho "${str/$str/}" | |
19 | ||
20 | recho "${snul##$snul}" | |
21 | recho "${str##$str}" | |
22 | recho "${str##$nul}" | |
3185942a JA |
23 | |
24 | A="" | |
25 | B="${A:0}" | |
26 | ||
27 | recho "$B" | |
28 | recho "${A:0}" | |
29 | recho "/tmp/test/TEST${A:0}" |