The following shell scrip will check the disk space and change the variable diskfull to 1 if the usage is more than 10% The last echo always shows
diskfull
1
In this line:
usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 )
it's not necessary to use cut. You can do this:
cut
usep=$(echo $output | awk -F% '{ print $1}' )