小编Pyt*_*ner的帖子

为什么 awk 不止一次打印这条线?

我有以下 ldif:

dn: cn=Robert Smith,ou=people,dc=example,dc=com
objectclass: inetOrgPerson
cn: Robert Smith
cn: Robert J Smith
cn: bob  smith
sn: smith
uid: rjsmith
userpassword: rJsmitH
carlicense: HISCAR 123
homephone: 555-111-2222
mail: r.smith@example.com
alias: rsmith@example.com
alias: bob.smith@example.com
description: nice hair
ou: Human Resources

dn: cn=John Doe,ou=people,dc=example,dc=com
objectclass: inetOrgPerson
cn: John Doe
cn: John Walker Doe
cn: Johnny
sn: Doe
uid: jdoe
userpassword: topsecret
carlicense: AKAHH 123
homephone: 123-458-362
mail: j.doe@example.com
alias: jdoe@example.com
alias: john.doe@example.com
description: cool guy
ou: Sales
Run Code Online (Sandbox Code Playgroud)

现在我正在针对它运行 awk 命令:

awk …
Run Code Online (Sandbox Code Playgroud)

awk ldif

2
推荐指数
1
解决办法
747
查看次数

标签 统计

awk ×1

ldif ×1