Published
- 1 min read
extract file extension bash
The solution for this is noted below
extract file extension bash
Solution
FILE="/path/to/file.extension"
echo "$FILE" | rev | cut -d '.' -f 1 | rev
Try other methods by searching on the site. That is if this doesn’t work