1 SC2118
Vidar Holen edited this page 2022-11-02 20:02:36 -07:00

Ksh does not support |&. Use 2>&1 |

Problematic code:

#!/usr/bin/ksh
make |& tee ~/log

Correct code:

#!/usr/bin/ksh
make 2>&1 | tee ~/log

Rationale:

You are using the Bash specific shorthand |&, but your script is running with Ksh. Rewrite it to its full, POSIX-compatible form as shown in the example.

Exceptions:

None

  • Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!