I created a simple script in bash language to do cleaning of the recycle bin in Ubuntu.
here is the script "recycle.sh"
#!/bin/bash PUBLIC_PATH="/home/fileserv/.recycle/Public" ##### Clean public recycle folder if [ !$(ls $PUBLIC_PATH | wc -l) -eq 0 ]; then /bin/rm -R $PUBLIC_PATH/* fi
But when I run
I encounter thise error:
./recycle.sh: line 4: [: !1: integer expression expected
Can somebody explain why? Any solutions to make it work?