3 ms·
The old way to remove a file extension is using basename: basename -s .png example.png example
by Symbiote 6y ago
The old way to remove a file extension is using basename:
basename -s .png example.png
example
- mhd 6y agoAlso strips the path and you have to know the extension name(s). For my examples, "cut" would be appropriate. But those substitutions tend to work in anything POSIX, not just bash/zsh.