fork download
  1. #!/bin/bash
  2.  
  3. declare -A UsersRestrictions
  4. UsersRestrictions['root']=""
  5.  
  6.  
  7. if [[ -z "${UsersRestrictions['root']}" ]] ; then
  8. echo root null
  9. else
  10. echo root not null
  11. fi
  12.  
  13. if [[ -z "${UsersRestrictions['notset']}" && "${UsersRestrictions['notset']+x}" ]]; then
  14. echo notset null
  15. else
  16. echo notset not null
  17. fi
Success #stdin #stdout 0.02s 5268KB
stdin
Standard input is empty
stdout
root null
notset not null