Perhaps because your shell is interpreting it literally?
I politely request you show us your actual code. Depending on what you are trying to do, there are glaring changes that can be made.
In reply to Re: sh: -c: line 1: syntax error near unexpected token `|'
by stevieb
in thread sh: -c: line 1: syntax error near unexpected token `|'
by perl@1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |