> > I'm still trying to figure out how the names differ.  Can you confirm
> > what is output by:
> >   src/m4 --help | head -n1
> 
> It is:
> Usage: C:\cygwin64\home\bruno\m4-2021-05-13\build-mingw64\src\m4.exe 
> [OPTION]... [FILE]...

In fact, it depends on the program that invokes src/m4. The answer I gave
is valid when I use Cygwin's bash to execute the command. When I use
cmd.exe, the file name is *not* made absolute.

> A similar thing could be done here:
> 
>   sed -e 's|[^ ]*\\m4\.exe|m4|' -e 's|^m4\.exe|m4|' -e 's|^/cygdrive/[^ 
> ]*/m4|m4|' | LC_ALL=C tr -d '\r'

This substitution will work, regardless how the invoking shell behaves
regarding the file names.

Bruno


Reply via email to