LINUX.ORG.RU

История изменений

Исправление le_, (текущая версия) :

Есть мнение, что:

Bash scripts are sensitive to line-endings, both in the script itself and in data it processes. They should have Unix-style line-endings, i.e., each line is terminated with a Line Feed character (decimal 10, hex 0A in ASCII).

Try:

sed -i 's/\r$//' backup.sh

Or:

dos2unix backup.sh

И еще, вот это $(docker ps -aq | tr '\n' ' ') можно заменить на это: $(docker ps -aq | tr '\r\n' ' ')

Исходная версия le_, :

Есть мнение, что:

Bash scripts are sensitive to line-endings, both in the script itself and in data it processes. They should have Unix-style line-endings, i.e., each line is terminated with a Line Feed character (decimal 10, hex 0A in ASCII).

Try:

sed -i 's/\r$//' backup.sh

Or:

dos2unix backup.sh