Hello, Assaf Gordon <assafgor...@gmail.com> skribis:
> Digging a bit further, I see this specific sed program originates > from autoconf, from the M4 code used to implement basename and dirname, > e.g. here: > https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/m4sugar/m4sh.m4#n922 > https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/m4sugar/m4sh.m4#n970 IIUC, ‘configure’ scripts first try to determine whether they have a working ‘basename’ and ‘dirname’ with: --8<---------------cut here---------------start------------->8--- if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi --8<---------------cut here---------------end--------------->8--- Jan, could it be that the ‘basename’ and ‘dirname’ implementations in Gash fail this test? It might be that sed is not needed if you get these right. Thanks, Ludo’.