linux - Extract group name from one line repeatedly? -
i got output command below. need extract group names.
dsattrtypenative:memberof: cn=grupa_test,ou=groups,dc=yellow,dc=com cn=firefox_install,ou=groups,dc=yellow,dc=com cn=network_admin,ou=groups,dc=yellow,dc=com
so have like:
grupa_test firefox_install network_admin
amount of groups different each time i'm not sure how achieve that.
$ awk -v rs=' ' -f'[=,]' 'nr>1{print $2}' file grupa_test firefox_install network_admin
the above work awk.
Comments
Post a Comment