I have a simple bash script called script.sh
!#/bin/bash
tar czf /var/log/apache2/Backup_$(date "+%d-%m-%Y").tar.gz /var/log/apache2/ --exclude='backup*' --exclude='Backup*'
When I rund this line in SSH-Console, all works fine but when I run the .sh-script at linux console with bash ./script.sh
then the tar czf ...
command works but ignore the --exclude parameters
Whats wrong? I don't know... :/