Here is the piece of code that gives the problem:
if [ " ls -l ~/sysbackups | wc -l " -gt 5]
What to do?
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsHere 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 fi;