Hi there,
I have an output from a command like this
# ypcat -k netgroup.byuser| grep steven
steven.* users_main,users_sysadmin,users_global,users_backup_team
and wanted to pull the 'users' netgroups returned into a perl array, that will look like this
users_main
users_sysadmin
users_global
users_backup_team
I would pretty happy with how to do it if everything in the string was a users_* split by a comma, but because I have the 'steven.*' with a space after it it falls over a bit,
does anyone know how I can only include the bits of the string that start with 'users_' into my array, excluding everything else? so effectively only buildng an array from the red bits below
# ypcat -k netgroup.byuser| grep steven
steven.* users_main,users_sysadmin,users_global,users_backup_team
any help would be greatly appreciated