1 #!/bin/bash
  2 for i in {1..10};do
  3         if id user$i &> /dev/null;then
  4                 userdel -r user$i &>/dev/null
  5                 echo "user$i is deleted"
  6         else
  7                 echo "This user isn't exist"
  8         fi
  9 done