瀏覽代碼

Merge pull request #2 from lbonanomi/who

test if the current user is sudo-su'd into this session
pull/39/head
lbonanomi 5 年之前
committed by GitHub
父節點
當前提交
2e28c6c0da
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 6 行新增0 行删除
  1. +6
    -0
      README.md

+ 6
- 0
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)


Loading…
取消
儲存