Need help with a script: Syntax error: redirection unexpected - cat <<< "$@" 1>&2;
by Tombar from LinuxQuestions.org on (#58TVX)
Hi,
I have some trouble in getting a script working. It worked until this weekend but now it seemed to have stopped working. The only thing I did over the weekend was that I installed "pi-hole". My environment is a Raspberry 3 with osmc (debian 9 (stretch)) used as mediacenter and for an installation of nextcloud.
Error message:
Code:root@osmc:/# sh /opt/nextcloud/NextcloudBackup.sh
/opt/nextcloud/NextcloudBackup.sh: 57: /opt/nextcloud/NextcloudBackup.sh: Syntax error: redirection unexpectedline 57 is the following:
Code:#!/bin/bash
.
.
.
# Function for error messages
errorecho() { cat <<< "$@" 1>&2; }The script that is not working any more is based on the following one with some minor adjustments:
https://codeberg.org/DecaTec/Nextclo...cloudBackup.sh
Code:bash --version
GNU bash, version 4.4.12(1)-release (arm-unknown-linux-gnueabihf)Thanks for any hint.
Cheers,
Tombar


I have some trouble in getting a script working. It worked until this weekend but now it seemed to have stopped working. The only thing I did over the weekend was that I installed "pi-hole". My environment is a Raspberry 3 with osmc (debian 9 (stretch)) used as mediacenter and for an installation of nextcloud.
Error message:
Code:root@osmc:/# sh /opt/nextcloud/NextcloudBackup.sh
/opt/nextcloud/NextcloudBackup.sh: 57: /opt/nextcloud/NextcloudBackup.sh: Syntax error: redirection unexpectedline 57 is the following:
Code:#!/bin/bash
.
.
.
# Function for error messages
errorecho() { cat <<< "$@" 1>&2; }The script that is not working any more is based on the following one with some minor adjustments:
https://codeberg.org/DecaTec/Nextclo...cloudBackup.sh
Code:bash --version
GNU bash, version 4.4.12(1)-release (arm-unknown-linux-gnueabihf)Thanks for any hint.
Cheers,
Tombar