I try to run this script on a host that use German as language.
The result was a error when the script try to compare the MAXATTSIZE and the ATTSIZE
This because ATTSIZE hasn't a value.
When the script init the ATTSIZE it looks for "total" but in german it is "insgesamt".
So I changed the line from this:
ATTSIZE=`du -c $BACKUPFILES | grep "[[:digit:][:space:]]total$" |sed s/\s*total//`
to this:
ATTSIZE=`du -c $BACKUPFILES | tail -n 1 | sed "s/^\([[:digit:]]\{1,\}\).*./\1/"`
Ok, I know it's not perfect but it works for me.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I try to run this script on a host that use German as language.
The result was a error when the script try to compare the MAXATTSIZE and the ATTSIZE
This because ATTSIZE hasn't a value.
When the script init the ATTSIZE it looks for "total" but in german it is "insgesamt".
So I changed the line from this:
ATTSIZE=`du -c $BACKUPFILES | grep "[[:digit:][:space:]]total$" |sed s/\s*total//`
to this:
ATTSIZE=`du -c $BACKUPFILES | tail -n 1 | sed "s/^\([[:digit:]]\{1,\}\).*./\1/"`
Ok, I know it's not perfect but it works for me.