A minimal example of the problem under Cygwin:

A directory with a Makefile:

        @echo "foo"

and a test.sh:


print $x

Now bash test.sh gives: Unable to initialize device PRN

  • 1
    There is no print command in bash, did you mean printf or echo? This seems to be the error Windows produces when trying to run the Windows commandline tool print: Unable to initialize device PRN in Python. Do you still have issues if you use echo?
    – terdon
    Apr 21, 2022 at 13:33
  • @terdon ok that was indeed the cause. But the minimal example only worked because I unknowingly introduced the exact same typo someone else did introduce many layers deeper in a Makefile. -.- That's why in the real example I thought it had something to do with $( ... ), which in fact is completely irrelevant.
    – Amaterasu
    Apr 21, 2022 at 14:11
  • Ah yes, those are always annoying to debug! I'll close this as non-reproducible then since the issue was something else. Glad you found a solution!
    – terdon
    Apr 21, 2022 at 14:23


Browse other questions tagged .