Q: unix sed remove adapter names I would like to pipe the output to sed and remove the below adapter names using sed and group the values with commas
ent13: 16 3979 ent12: 211 411 3978 ent11: 15 3977 ent10: 111 178 179 311 511 1719 3976


A: Replace spaces by commas, remove words before colons, remove the leading space, remove commas before spaces:
sed 's/ /,/g; s/[^,]*:,/ /g;s/^ //;s/, / /g'

Output:
16,3979 211,411,3978 15,3977 111,178,179,311,511,1719,3976


A: You could a sed to first remove the pattern containing ent and then put the spacing away and replace it with , as
sed 's/ent[0-9][0-9]: //g; s/ /,/g'


A: Using GNU awk or mawk (to support regular expressions in RS):
$ mawk -v RS='ent[0-9][0-9]: ' -v ORS=' ' -v FS=' ' -v OFS=',' '
    $1 != "" { $1=$1; print }
    END      { printf("\n") }' <file
16,3979 211,411,3978 15,3977 111,178,179,311,511,1719,3976

Or, equivalently,
$ mawk 'BEGIN    { RS="ent[0-9][0-9]: "; ORS=FS=" "; OFS="," }
        $1 != "" { $1=$1; print } 
        END      { printf("\n") }' <file
16,3979 211,411,3978 15,3977 111,178,179,311,511,1719,3976

This treats the single line as a set of records separated by entNN: (where N is some digit).  Each record is read as a set of space-delimited fields.
The $1 != "" test skips the first empty record (there's nothing before the first record separator) and the corresponding block reformats the record for output by simply doing $1=$1.  This will cause awk to reformat it using the supplied ORS and OFS values.

A: Does "group the values with commas" mean "separate each adapter's numbers with a comma from other adapters'"? Then, try
sed 's/ *ent[0-9][0-9]: /, /g; s/^, //g' file
16 3979, 211 411 3978, 15 3977, 111 178 179 311 511 1719 3976

