Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(iperf): work around failglob with backslash in bash-5.0
In Bash 5.0, a backslash in an unquoted variable expansion $var induces a pathname expansion, and the backslash is removed. In addition, the execution fails when `shopt -s failglob` is set and there are no filenames matching the pattern. The raw variable expansion $var can also be subject to unexpected word splitting with a custom IFS. One should store command words in an array or should `eval` the command stored in a scalar variable. This PR uses an array variable. Note: This Bash behavior was required by the literal interpretation of the POSIX wording. After Bash 5.0 implemented this literal interpretation, a discussion on the POSIX interpretation arose. Finally the POSIX wording was modified to match the behavior of Bash < 5.0. Then, the Bash behavior was reverted in Bash 5.1. For this reason, this behavior of the pathname expansion is only observed in Bash 5.0.
- Loading branch information