Takes out any piece of a filename you'd like to get rid of. It doesn't take wildcards though.
$ basename ABC_s.vpf _s.vpf
ABC
$ basename AB123 3
AB12
$ basename AB12_34 12*4It also removes the directory names from the path:
AB12_34
$ basename a/b/c/d/AB12_34
AB12_34
$ basename a/b/c/d/AB12_34 2_34
AB1