1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-20 22:17:09 +08:00

Merge pull request #2272 from Victor-PYJ/shell_string

shell脚本字符串截取结果修正
This commit is contained in:
Guide 2024-02-19 17:05:22 +08:00 committed by GitHub
commit 8fc0709d5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -220,7 +220,7 @@ var="https://www.runoob.com/linux/linux-shell-variable.html"
# 注: *为通配符, 意为匹配任意数量的任意字符
s1=${var%%t*} #h
s2=${var%t*} #https://www.runoob.com/linux/linux-shell-variable.h
s3=${var%%.*} #http://www
s3=${var%%.*} #https://www
s4=${var#*/} #/www.runoob.com/linux/linux-shell-variable.html
s5=${var##*/} #linux-shell-variable.html
```