Você pode usar os argumentos GREP :
-P, --perl-regexp
Interpret the pattern as a Perl-compatible regular expression
(PCRE). This is experimental and grep -P may warn of
unimplemented features.
-o, --only-matching
Print only the matched (non-empty) parts of a matching line,
with each such part on a separate output line.
Então seu comando seria:
echo ""dfs.datanode.data.dir" : "/rid/sdb/oo/hdfs/data,/rid/sdc/oo/hdfs/data,/rid/sdd/oo/hdfs/data,/rid/sde/oo/hdfs/data,/rid/sdf/oo/hdfs/data"," | grep -oP "\w*sd\w*"
sdb
sdc
sdd
sde
sdf