I'm trying to redirect shell output to both console and file I have tried below
#!/bin/sh
exec &> >(tee -a log.log)
echo "testing"
And running the shell script in terminal like ./filename.sh but getting error "syntax error near unexpected token `>'", I'm using iTerm terminal in Macbook
Finally I want to run the whole script in AWS data pipeline.