Bash多行字符串处理

博文背景

Bash中的多行字符串之前一直玩不转,今天终于算是把他搞清楚了。

具体操作
#!/bin/bash
read -r -d '' cmd <<- 'EOF'
hello world
hello
world
hello world
hello world
EOF

OLD_IFS=$IFS;
IFS=$'\n';

echo &#

你可能感兴趣的:(Bash)