${name:e}: File Extension
Extracts the file extension from a path.
It takes the last segment of the path and returns the string after the last . of this filename segment.
If there is no . character or if the filename ends with ., then an empty string is returned.
Links
Examples
- Extract file extension of a path
- Output:
1 2myPath="/home/user/work/data.csv" echo $myPath:e1csv
BashSupport Pro ist eine Zsh IDE mit Unterstützung für $varName:e - probieren Sie es jetzt aus!