mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-27 23:53:18 +02:00
86 lines
1.0 KiB
Plaintext
86 lines
1.0 KiB
Plaintext
echo "Single Quote"
|
|
echo 'foo
|
|
bar'
|
|
echo 'foo
|
|
bar'
|
|
echo 'foo\
|
|
bar'
|
|
|
|
echo "Double Quote"
|
|
echo "foo
|
|
bar"
|
|
echo "foo
|
|
bar"
|
|
echo "foo\
|
|
bar"
|
|
|
|
echo "Backslash Single Quote"
|
|
echo `echo 'foo
|
|
bar'`
|
|
echo `echo 'foo
|
|
bar'`
|
|
echo `echo 'foo\
|
|
bar'`
|
|
|
|
echo "Backslash Double Quote"
|
|
echo `echo "foo
|
|
bar"`
|
|
echo `echo "foo
|
|
bar"`
|
|
echo `echo "foo\
|
|
bar"`
|
|
|
|
echo "Double Quote Backslash Single Quote"
|
|
echo "`echo 'foo
|
|
bar'`"
|
|
echo "`echo 'foo
|
|
bar'`"
|
|
echo "`echo 'foo\
|
|
bar'`"
|
|
|
|
echo "Dollar Paren Single Quote"
|
|
echo $(echo 'foo
|
|
bar')
|
|
echo $(echo 'foo
|
|
bar')
|
|
echo $(echo 'foo\
|
|
bar')
|
|
|
|
echo "Dollar Paren Double Quote"
|
|
echo $(echo "foo
|
|
bar")
|
|
echo $(echo "foo
|
|
bar")
|
|
echo $(echo "foo\
|
|
bar")
|
|
|
|
echo "Double Quote Dollar Paren Single Quote"
|
|
echo "$(echo 'foo
|
|
bar')"
|
|
echo "$(echo 'foo
|
|
bar')"
|
|
echo "$(echo 'foo\
|
|
bar')"
|
|
|
|
# old-style command substitution parsing compatibility tests -- post bash-3.1
|
|
recho 'foo \\
|
|
bar'
|
|
|
|
recho 'foo \
|
|
bar'
|
|
|
|
echo `recho sed -e 's/[ :]/\\
|
|
/g'`
|
|
|
|
echo `recho sed -e 's/[ :]/\
|
|
/g'`
|
|
|
|
echo `recho 'foo\\
|
|
bar'`
|
|
|
|
echo `recho 'foo\
|
|
bar'`
|
|
|
|
echo $(recho 'foo\
|
|
bar')
|