[Solved] Bash: Syntax error: redirection unexpected

This problem is raised by many posts as an interpreter problem
therefore, we only need to add

#!/bin/bash

If not, add

#!/usr/bin/env bash

If still not, use./xxx.sh instead of SH xxx.sh

Read More: