Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 179 Bytes

assign-multi-lines-string-to-variable.md

File metadata and controls

17 lines (13 loc) · 179 Bytes
tags
bash

多行字符串赋值给变量

重点: 要保留换行符

IFS='' str=$(cat <<'EOF'
echo hello

bind -x '"\t": bash_completion'
EOF
)

echo $str