Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想找出当前用户使用 SHELL SCRIPT 打开的终端数量。如何为此编写shell脚本?
who | grep root | wc -l替换root为任何用户将告诉您指定用户已打开的终端数量。
who | grep root | wc -l
root