I'd like to parse different kinds of Java archive with the sed
command line tool.
Archives can have the followin extensions:
.jar
, .war
, .ear
, .esb
What I'd like to get is the name without the extension, e.g. for Foobar.jar
I'd like to get Foobar
.
This seems fairly simple, but I cannot come up with a solution that works and is also robust.
I tried something along the lines of sed s/\.+(jar|war|ear|esb)$//
, but could not make it work.