id
This commit is contained in:
parent
0b0bce29dd
commit
0050d26e12
3 changed files with 10 additions and 7 deletions
9
sh/id.sh
Normal file
9
sh/id.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
# id
|
||||
|
||||
# check if current user is root
|
||||
#| id
|
||||
rwx_id_root() {
|
||||
local user_id
|
||||
user_id="$(id -u)"
|
||||
[ "${user_id}" -eq 0 ] || return 1
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue