1

I'm trying to cross io between two processes and coproc does not seem to be installed in OS X 10.11.x.

I get: bash: coproc: command not found

My bash version is: GNU bash, version 4.3.42(1)-release (x86_64-apple-darwin15.3.0)

How can I install coproc?

Rodrigo
  • 131
  • 2
  • 6
  • How did you start `bash`? You might have a newer version of `bash` installed somewhere like `/usr/local/bin/bash`, but that is the error message you would get if you try to use a coprocess using `/bin/bash` (which is still 3.2.57). – chepner Oct 21 '16 at 16:47
  • My terminal starts at bash by running command "bash". If is run:/bin/bash --version" I see "GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)" Then I run "/bin/bash" and then "coproc" and I see "bash: coproc: command not found" I did have another bash at /opt/local/bin/bash. I've renamed it but I still get the not found error, and when I run "which bash" I see "/bin/bash". – Rodrigo Oct 22 '16 at 06:16
  • 1
    You are trying to use `coproc` with the wrong version of `bash`. If you had run `/opt/local/bin/bash`, you would be using 4.3.42. – chepner Oct 22 '16 at 11:18

1 Answers1

0

Thanks @chepner! The issue was even though I had installed bash 4 in /opt/local/bin/bash, my calling script had the #!/bin/bash - header.

Marcello Romani
  • 2,967
  • 31
  • 40
Rodrigo
  • 131
  • 2
  • 6