1 单双引号的区别

双引号能识别 变量名
单引号只是原生字符串
它们 都不能识别 转义字符, 要加上-e参数
image.png

2 字符串常用方法

  • 输出字符串长度: #

image.png

  • 字符串切片

image.png