Article 581QY search/filter on user groups using sed/awk

search/filter on user groups using sed/awk

by
oliveoyl
from LinuxQuestions.org on (#581QY)
Hello,

Looking to filter the ouput of id command on particular group that will always begins with tdh_mbc_ and there is only going to be exactly one.

$ id -nG
vqh_ub5 tdh-benjo pbl_tubogpse pbl_svuin tdh_dmvtufs_benjot tdh_dmvtufs_vtfst tdh_dmvtufs_bqqt tdh_mbc_svuin dmfbobjs_dmvtufs_vtfst tdh_httd_vtfst pbl_tdh-mbc_svuin

# id -nG | AWK OR SED
expected result: tdh_mbc_svuinlatest?d=yIl2AUoC8zA latest?i=r39_XsH5F8g:TpPzvS9z8qY:F7zBnMy latest?i=r39_XsH5F8g:TpPzvS9z8qY:V_sGLiP latest?d=qj6IDK7rITs latest?i=r39_XsH5F8g:TpPzvS9z8qY:gIN9vFwr39_XsH5F8g
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments