linux shell的单行多行注释

1.单行注释,使用符号#

echo "123456"

echo "test"

#echo "comment“

2. 多行注释

(1)使用 :<<!  !

filename=test.txt
:<<!
fileContent=`cat $filename`

i=0
for line in $fileContent
do
    fileList[$i]=$line
    ((++i))
done

!

(2) 使用语句 if false then fi

echo "0:"
if false
then
    echo "1:"
    echo "2:"
    echo "3:"
fi
echo "4:"
原文地址:https://www.cnblogs.com/sssblog/p/10143138.html