Probably not the best subject line ever but not quite sure how to explain it.
Basically I need to get the text between two known words.
The command output looks something like:
Quote:
blah
blah
blah
blah
Group:
name_of_group
name_of_group
name_of_group
name_of_group
name_of_group
name_of_group
name_of_group
name_of_group
HomeDirectory: blah
blah
blah
etc ...
Using a dscl command I get all the AD Attributes of a user, and I need to get the users group info. But the number of groups there are depends on the user, and sometimes the output of the Group attribute are contained to a single line, and sometimes its multiple lines. I need a way of getting all the text between the word "Group:" and "HomeDirectory:".