shell脚本怎么替换某个关键字以下的内容

hello
a
b
how
a
b
word
a
b

将上面how下面的b替换成c,但是不会替换hello下面和word下面的b,通过shell
怎么实现呢,有没有shell的高手能帮忙看看

sed '5,6s/b/c/g' substitute2

图片说明