sed を使用して、多数の行の先頭を削除しようとしています。目標は、大文字が 2 つ連続する単語まで、各行のすべての文字を削除することです。
入力は常に次のようなものになります。
1 where did you get ACQUIRE, obtain, come by, receive, gain, earn, win, come into, take
2 I got your letter: RECEIVE, be sent, be in receipt of, be given.
3 your tea is getting cold: BECOME, grow, turn, go.
4 get the children from school: FETCH, collect, go for, call for, pick up, bring, deliver, convey, ferry, transport.
5 the chairman gets £650,000 a year: EARN, be paid, take home, bring in, make, receive, collect, gross; informal pocket, bank, rake in, net, bag.
6 have the police got their man?: APPREHEND, catch.
そして、出力を次のようにしたい:
ACQUIRE, obtain, come by, receive, gain, earn, win, come into, take
RECEIVE, be sent, be in receipt of, be given.
BECOME, grow, turn, go.
FETCH, collect, go for, call for, pick up, bring, deliver, convey, ferry, transport.
EARN, be paid, take home, bring in, make, receive, collect, gross; informal pocket, bank, rake in, net, bag.
APPREHEND, catch.
私はこれを構築する必要があります:
sed -n 's/^.*[A-Z]\{2\}//p'
ただし、この式は大文字の単語も削除します。これを行う方法の手がかりはありますか?