Parcourir la source
Merge pull request #39 from lbonanomi/master
Test if the current user is sudo-su'd into this session
pull/41/head
@trimstray
il y a 5 ans
committed by
GitHub
Parent
révision
aa2adcbee2
Aucune clé connue n'a été trouvée dans la base pour cette signature
ID de la clé GPG: 4AEE18F83AFDEB23
1 fichiers modifiés avec
6 ajouts et
0 suppressions
-
README.md
|
|
@@ -1236,6 +1236,12 @@ ___ |
|
|
|
who -b |
|
|
|
``` |
|
|
|
|
|
|
|
###### Detect a user sudo-su'd into the current shell |
|
|
|
|
|
|
|
```bash |
|
|
|
[[ $(who -m | awk '{ print $1 }') == $(whoami) ]] || echo "You are su-ed to $(whoami)" |
|
|
|
``` |
|
|
|
|
|
|
|
___ |
|
|
|
|
|
|
|
##### Tool: [screen](https://en.wikipedia.org/wiki/GNU_Screen) |
|
|
|