title: Anyone know how to fix hadoop-functions.sh "syntax error near unexpected token `<'"?
body: <p>I've configured Hadoop 3.1.1 on my MacPro running OSX 10.14.2, and I'm getting the following error when I run start-all.sh </p>
  
  <pre class="lang-sh prettyprint-override"><code>$ sudo /usr/local/Cellar/hadoop/3.1.1/sbin/start-all.sh
  Starting namenodes on [localhost]
  /usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-functions.sh: line 398: syntax error near unexpected token `&lt;'
  /usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-functions.sh: line 398: `  done &lt; &lt;(for text in "${input[@]}"; do'
  /usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 70: hadoop_deprecate_envvar: command not found
  /usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 87: hadoop_bootstrap: command not found
  /usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 104: hadoop_parse_args: command not found
  /usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 105: shift: : numeric argument required
  /usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 244: hadoop_need_reexec: command not found
  /usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 252: hadoop_verify_user_perm: command not found
  /usr/local/Cellar/hadoop/3.1.1/libexec/bin/hdfs: line 213: hadoop_validate_classname: command not found
  /usr/local/Cellar/hadoop/3.1.1/libexec/bin/hdfs: line 214: hadoop_exit_with_usage: command not found
  /usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 263: hadoop_add_client_opts: command not found
  /usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 270: hadoop_subcommand_opts: command not found
  /usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 273: hadoop_generic_java_subcmd_handler: command not found
  </code></pre>
  
  <p>Same issues starting the datanodes, secondary namenodes, resourcemanager, and nodemanagers.</p>
  
  <p>I have found a similar bug reference online:  <a href="https://issues.apache.org/jira/browse/HDFS-12571" rel="nofollow noreferrer">https://issues.apache.org/jira/browse/HDFS-12571</a>.</p>
  
  <p><strong>Update</strong>
  After some debugging, the root cause is bash "&lt; &lt;(command)" syntax not being accepted for some reason.  The bash versions on the system (/bin/bash and /usr/local/bin/bash from Homebrew) both work properly.</p>