Denys Vlasenko | 294eb46 | 2018-07-20 16:18:59 +0200 | [diff] [blame] | 1 | f() { for i; do echo "|$i|"; done; } |
| 2 | |
| 3 | echo Unquoted 1: |
| 4 | x='1 2'; f a${x:+ 'x y' $x '' "$x" `echo A B` "`echo C D`" z}b |
| 5 | echo Quoted 1: |
| 6 | x='1 2'; f "a${x:+ 'x y' $x '' "$x" `echo A B` "`echo C D`" z}b" |
| 7 | |
| 8 | echo Unquoted 2: |
| 9 | x='1 2'; f a${x:+'x y' $x '' "$x" `echo A B` "`echo C D`" z }b |
| 10 | echo Quoted 2: |
| 11 | x='1 2'; f "a${x:+ 'x y' $x '' "$x" `echo A B` "`echo C D`" z }b" |
| 12 | |
| 13 | #echo Unquoted 3: |
| 14 | #e= |
| 15 | #x='1 2'; f a${x:+'x y' $x '' "$x" $e $e "$e" $e `echo A B` "`echo C D`" z }b |
| 16 | #echo Quoted 3: |
| 17 | #x='1 2'; f "a${x:+ 'x y' $x '' "$x" $e $e "$e" $e `echo A B` "`echo C D`" z }b" |