Here is the piece of code that gives the problem:

if [ " ls -l ~/sysbackups | wc -l " -gt 5]

What to do?


You have to use :

if [ `ls -l  ~/sysbackups | wc -l` -gt 5 ];then
    echo XXXXX
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.