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

 

相关文章:

  • 2022-12-23
  • 2021-05-28
  • 2022-12-23
  • 2021-08-03
  • 2022-12-23
  • 2021-10-10
  • 2021-08-07
  • 2021-12-29
猜你喜欢
  • 2022-01-14
  • 2021-10-14
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案