shell编程---模式匹配

                                       模式匹配

  1 #! /bin/bash
  2 PRINT="Remind some import things"
  3 PATH=/home/andy/test_shell/andy.txt.back
  4 echo ${PATH#/*/}
  5 echo ${PATH##/*/}
  6 echo ${PATH%.*}
  7 echo ${PATH%%.*}

猜你喜欢

转载自blog.csdn.net/yanlaifan/article/details/114222407