language: Bash (bash 4.0.35)
date: 239 days 11 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
 
declare -A UsersRestrictions
UsersRestrictions['root']=""
 
 
if [[ -z "${UsersRestrictions['root']}" ]] ; then
    echo root null
else 
    echo root not null
fi
 
if [[ -z "${UsersRestrictions['notset']}" && "${UsersRestrictions['notset']+x}" ]]; then
    echo notset null
else 
    echo notset not null
fi