【发布时间】:2019-10-01 19:22:53
【问题描述】:
我有这个:
echo `cat << 'EOF'
select c1, c2 from foo
where c1='something'
EOF`
它将这个记录到标准输出:
select c1, c2 from foo where c1='something'
但我希望以某种方式保留换行符,因此它会输出:
select c1, c2 from foo where c1='something'
我该怎么做?
【问题讨论】:
-
你为什么使用
echo `...`而不是仅仅运行cat?