diff --git a/SC2118.md b/SC2118.md new file mode 100644 index 0000000..a17d52d --- /dev/null +++ b/SC2118.md @@ -0,0 +1,26 @@ +## Ksh does not support `|&`. Use `2>&1 |` + +### Problematic code: + +```sh +#!/usr/bin/ksh +make |& tee ~/log +``` + +### Correct code: + +```sh +#!/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! \ No newline at end of file