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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -