|
转换以下文档:
Joey: What, like there's a rule or something?
(The door buzzer sounds and Chandler gets it.)
Chandler: Please don't do that again, it's a horrible sound.
Paul: (over the intercom) It's, uh, it's Paul.
Monica: Oh God, is it 6:30? Buzz him in!
Joey: Who's Paul?
转换成:
{\bf Joey:} What, like there's a rule or something?
(The door buzzer sounds and Chandler gets it.)
{\bf Chandler:} Please don't do that again, it's a horrible sound.
{\bf Paul:} (over the intercom) It's, uh, it's Paul.
{\bf Monica:} Oh God, is it 6:30? Buzz him in!
{\bf Joey:} Who's Paul?
我用:
sed 's/[A-Z]*:/{\\bf & }' $1 > tmp.txt
有的回没有转换.
用:
sed 's/[A-Z].*:/{\\bf & }' $1 > tmp.txt
则
Monica: Oh God, is it 6:30? Buzz him in!
转成
{\bf Monica: Oh God, is it 6: }30? Buzz him in!
请问怎样才能正确转换??
有些是这样的:
Phoebe, Ross, Chandler, and Joey: Push her down the stairs! Push her down the
stairs! Push her down the stairs!
应该转换成:
{\bf Phoebe, Ross, Chandler, and Joey:} Push her down the stairs! Push her down the
stairs! Push her down the stairs! |
|