1 # inspired by an autoconf generated configure script. 2 s%/[^/][^/]*$%% 3 s%[\/][^\/][^\/]*$%% 4 s,.*[^\/],, 5