Linux 用户列表和 UID/bash 层

标签 linux bash list

您好,我需要将 UID 添加到用户列表并仅列出具有 bash 层的用户,请帮忙

Cat /etc/passwd |grep "/etc/passwd" |cut -d: f1

最佳答案

这就是答案

grep "/bin/bash" "/etc/passwd" |cut -d\: -f1,3

你们是如此亲密

不要低估自己。 如果您再多花 5 分钟,您就会找到它了;-)

关于Linux 用户列表和 UID/bash 层,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20269008/

相关文章:

python - Python 中反转字符串和回文时间复杂度

Python - 文件中的元组列表

python - 对 "list"列表中的元素求和,每个元素具有不同的索引

c - 在连接到服务器之前尝试编译客户端时出错

windows - Qt - 在 Windows 上为 Linux 交叉编译

linux - 资源linux脚本,禁用/刷新额外输入

linux - 在日志文件中计算时间

linux - 在 bash 中创建空文件的简写在 zsh 中无法正常工作

linux - ssh + ssh 卡在远程计算机上

linux - RedLevel1 和无法打开共享对象文件 : No such file or directory