0

Here is the piece of code that gives the problem:

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

What to do?

2

You have to use :

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

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.