Open codestation opened 5 years ago
Is this a dup of #2385?
@dkerr64 no, because in this case the regular expression isn't the culprit. The problem comes because on alpine (their grep doesn't support extended regex) _e_grep_o tries to use the pipe input twice and tries to run the regex on sed with an empty input.
Still, #2385 cannot even be fixed because the whole function is flawed until #1366 is merged.
@codestation okay thank you. I have decided to stop using _e_grep_o() as I can use standard grep without extended regex. I have a PR #2434 awaiting @Neilpang to merge for FreeDNS for this. Thanks.
This bug was reported on #1364 and a pull request was made that solved the problem on #1366 but it was never merged and instead a workaround was pushed.
Right now on on the latest version (2.8.2) dns_linode.sh and dns_linode_v4.sh (and maybe others) are broken because this bug (the domain cannot be found) Can #1366 be properly merged? I made a test case to further demonstrate that the current implementation is broken because the pipe cannot be read twice.
Steps to reproduce
test.sh
The test also includes individual grep/sed calls to see that they aren't broken when used directly.