【发布时间】:2018-12-27 12:25:17
【问题描述】:
为什么下面的文件阅读器和注释行检查会跳过空行?
while read line; do
if [ ! ${line:0:1} == "#" ]; then # leave out comments
function_call $line
fi
done < list_items.txt
【问题讨论】:
-
Quotes 更有趣的是,为什么
[ ! == '#' ]返回false。
标签: bash