Ver código fonte

test if the current user is sudo-su'd into this session

- signed-off-by: lbonanomi <lbonanomi@gmail.com>
pull/39/head
lbonanomi 5 anos atrás
pai
commit
985714befd
1 arquivos alterados com 6 adições e 0 exclusões
  1. +6
    -0
      README.md

+ 6
- 0
README.md Ver arquivo

@@ -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)


Carregando…
Cancelar
Salvar