Skip to content
Vidar Holen edited this page Nov 3, 2022 · 1 revision

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

Related resources:

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

ShellCheck

Each individual ShellCheck warning has its own wiki page like SC1000. Use GitHub Wiki's "Pages" feature guerraart8 to find a specific , or see Checks.

Clone this wiki locally