我file1.txt
在 Unix 上有一个文本文件。我想生成另一个文件file2.txt
,在其中更改所有具有这种格式的行组(取自多项选择题)
a. [first choice]
b. [second choice]
c. [third choice]
到
[first choice] [second choice] [third choice]
我怎么能那样做?
编辑:一个例子是
What is the value of three plus five?
a. six
b. seven
c. eight
This line is not so relevant.
blah blah
What is the capital of England?
a. London
b. Birmingham
c. New York
它应该转换为
What is the value of three plus five?
six seven eight
This line is not so relevant.
blah blah
What is the capital of England?
London Birmingham New York