var_posix1.tests 269 B

123456789101112131415161718192021
  1. var=ababcdcd
  2. echo ${var#ab}
  3. echo ${var##ab}
  4. echo ${var#a*b}
  5. echo ${var##a*b}
  6. echo ${var#?}
  7. echo ${var##?}
  8. echo ${var#*}
  9. echo ${var##*}
  10. echo ${var%cd}
  11. echo ${var%%cd}
  12. echo ${var%c*d}
  13. echo ${var%%c*d}
  14. echo ${var%?}
  15. echo ${var%%?}
  16. echo ${var%*}
  17. echo ${var%%*}
  18. echo end