|
发表于 2003-6-23 15:25:24
|
显示全部楼层
挺好玩的,这个还是awk版本 一行搞定
$cat rawdata.3 | awk 'BEGIN {FS=":}"} {if ($1!="") {print substr($1,1,6)tolower(substr($1,7))":}"$2} else {print $0}}'
{\bf Monica:} Maye it's me.
{\bf Ross:} Don't be silly. Ben loves you. He's just being Mr. Crankypants.
{\bf Chandler:} You know, I once dated a Miss Crankypants. Lovely girl, kinda moody.
{\bf Ross:} There we go. All better. (gives Ben back to Monica)
{\bf Monica:} There's my little boy. (Ben starts crying again)
{\bf Chandler:} Can I uh see something? (Takes Ben. When he puts him close to Monica, Ben cries. When he moves Ben away, he stops crying.)
{\bf Joey:} Cool.
{\bf Monica:} He hates me. My nephew hates me. |
|