Closed kenorb closed 7 years ago
Can you see if this works please? https://github.com/Winetricks/winetricks/commit/d3205e91f2ab7e532c2b786cb98ad54d0555db81
I was able to test it in Travis CI, though it's very slow.
Merged it https://github.com/Winetricks/winetricks/commit/d3205e91f2ab7e532c2b786cb98ad54d0555db81
It seems it works, thanks. Ex could the substitution as well (e.g. ex +"s/$/\r/" -scwq tmp.ahk
).
ex is vim specific, which isn't portable. sed is way more common :)
When Vim is not installed, there is still POSIX version of Ex installed on every Unix/Linux machine by default. On the other hand Sed parameters can be incompatible between Linux/Unix (e.g. -i
which is a custom BSD extension). So sed is common as a StrEm eDitor, Ex is common as a in-place file editor. In this case it's a stream, so sed or awk is fine.
When Vim is not installed, there is still POSIX version of Ex installed on every Unix/Linux machine by default.
As far as I can tell, without Vim, there will be no Ex on Gentoo installations, where '/usr/bin/ex' is a symlink to 'vim' (unless the user did something outside the package manager).
Gentoo might be a bit different from 'the default' in many other ways as well, but still. :]
@kenorb yeah, I'm aware that BSD/GNU sed are different (and there's another case that's probably broken that I'll fix soon). I don't regularly test on osx, but will fix any issues reported there (I have access to a mac mini).
Regarding ex, thanks for the tip, I wasn't aware of it. I'd rather use sed/awk, as they are much more well known.
Reproducible steps (tested on macOS Sierra):
This also happens for me when running in the standard way:
Error:
Relevant trace log:
Somehow created
tmp.ahk
file consist weirdr
characters at the end of each line.Most like it's because of BSD
sed
.The problem is how the BSD sed handles the substitution of
$
. Here is the difference between GNU sed and BSD sed: