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:"

 

posted @ 2018-12-19 14:42  c++11  阅读(6682)  评论(0)    收藏  举报