Denys Vlasenko | b762c78 | 2018-07-17 14:21:38 +0200 | [diff] [blame^] | 1 | f() { for i; do echo "|$i|"; done; } |
2 | x=a | ||||
3 | |||||
4 | echo Unquoted b c d | ||||
5 | f ${x:+b c d} | ||||
6 | echo Unquoted "'b c' d" | ||||
7 | f ${x:+'b c' d} | ||||
8 | echo Unquoted '"b c" d' | ||||
9 | f ${x:+"b c" d} | ||||
10 | |||||
11 | echo Quoted b c d | ||||
12 | f "${x:+b c d}" | ||||
13 | echo Quoted "'b c' d" | ||||
14 | f "${x:+'b c' d}" | ||||
15 | echo Quoted '"b c" d' | ||||
16 | f "${x:+"b c" d}" |