开发者社区 问答 正文

Linux sed 命令中Linux sed 命令中搜索/etc/passwd,找的命令是什么呢?

Linux sed 命令中Linux sed 命令中搜索/etc/passwd,找的命令是什么呢?

展开
收起
bnbajjyhyjfty 2021-12-04 15:14:40 496 分享 版权
1 条回答
写回答
取消 提交回答
  • Linux sed 命令中搜索/etc/passwd,找的命令是:

    nl /etc/passwd | sed -n '/root/{s/bash/blueshell/;p;q}'
    1 root:x:0:0:root:/root:/bin/blueshell

    2021-12-06 08:43:51
    赞同 展开评论