syntax error near unexpected token `<'
sh
(which in most (Debian-derived) systems is linked to dash
) doesn't allow process substitution. Try invoke by bash script.sh
. Same calling by ./script.sh executes with sha-bang
which is /bin/bash
in your script.