使用bash读取文本文件中的行的子集

Mar*_*kus 2 bash

我有一个文件

line a - this is line a
line b - this is line b
line c - this is line c
line d - this is line d
line e - this is line e
Run Code Online (Sandbox Code Playgroud)

问题是:如何使用bash命令输出从"line b"开始直到"line d"的行?我的意思是,获得:

"line b - this is line b
 line c - this is line c
 line d - this is line d"
Run Code Online (Sandbox Code Playgroud)

gho*_*g74 5

sed -n '/line b/,/line d/p' file
Run Code Online (Sandbox Code Playgroud)