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