Hacker News new | ask | show | jobs
by Symbiote 1954 days ago
The old way to remove a file extension is using basename:

   basename -s .png example.png
   example
1 comments

Also 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.