Хорошая идея - проверить его скрипты с помощью этого инструмента.
Вот аннотированная версия вашей ошибки:
1 #!/bin/bash
2 sed -rne '/21:25:07/,/21:50:07/ p' server.log.2015-04-21 > /tmp/filename.log ;
3 du -sh /tmp/filename.log ;
4 if [`du -sh /tmp/filename.log` -gt 0] then gzip /tmp/filename.log ;
^––SC1009 The mentioned parser error was in this if expression.
^––SC1073 Couldn't parse this test expression.
^––SC1035 You need a space after the [ and before the ].
^––SC1020 You need a space before the ].
^––SC1072 Missing space before ]. Fix any mentioned problems and try again.