0

I'm running the following shell script on a Synology DSM 6:

DATE=`date +%Y%m%d_%H%M%S`
/usr/local/mariadb10/bin/mysqldump -u user -ppwd fm | 
gzip -c -9 > /volume1/homes/username/SOS_BU/Syn_MariaDB/fm_${DATE}.gz

The problem is that after execution, the filename has a carriage return left to the point. Example:

fm_20180113_125554[CR].gz

So, the file is created, but the filename causes trouble with a CR in it.

Anyone has an idea where the CR comes from and how I can avoid it?

agc
  • 7,973
  • 2
  • 29
  • 50
Hans Meyer
  • 47
  • 5

0 Answers0