Przeglądaj źródła
Merge pull request #2 from lbonanomi/who
test if the current user is sudo-su'd into this session
pull/39/head
lbonanomi
5 lat temu
committed by
GitHub
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z
6 dodań i
0 usunięć
-
README.md
|
|
@@ -1227,6 +1227,12 @@ ___ |
|
|
|
who -b |
|
|
|
``` |
|
|
|
|
|
|
|
###### Detect a user sudo-su'd into the current shell |
|
|
|
|
|
|
|
``` |
|
|
|
[[ $(who -m | awk '{ print $1 }') == $(whoami) ]] || echo "You are su-ed to $(whoami)" |
|
|
|
``` |
|
|
|
|
|
|
|
___ |
|
|
|
|
|
|
|
##### Tool: [screen](https://en.wikipedia.org/wiki/GNU_Screen) |
|
|
|