wind_mark · 2006-03-08 09:59:47 · 阅读: 475 hoho, try this way... get 3 lines since the first line contains the keyword: sed -n '/ktlccond/,$p' yourfile|sed -n '1,3p'