Is it possible to remove rather than adding substring to a filename using bash brace expansion?
Considering the following scenario, one can add a suffix to a filename by using the below technique:
What it does is renaming
offlineimap.conf.minimal which is very handy esp. for making backup files (eg. swith
But is it also possible to subtract substrings from given filenames, like so:
Here I use
- as a hypothetical special character to substract the substring.
I expect the second technique to result in
offlineimap.conf removing the
.minimal suffix from the name of an existing file.