What does the curly-brace syntax ${var%.*} mean?

后端 未结 3 1710
慢半拍i
慢半拍i 2020-12-01 10:45

I was reviewing some of my old code and came across this syntax:

extractDir=\"${downloadFileName%.*}-tmp\"

The only information I found sea

3条回答
  •  感动是毒
    2020-12-01 11:25

    It is used when expanding an environment variable adjacent to some text that is not the variable, so the shell does not include all of it in the variable name.

提交回复
热议问题