the file like:
File /home/user/ int yl_init(void); File /home/user/ int yl2_init(void);
File /home/user/
int yl_init(void);
int yl2_init(void);
I want u
This might work for you (GNU sed);
sed '/File/,/;/!d;/;/q' file
/File/,/;/!d
File
;
/;/q
You can use a the q command to cause sed to exit when the second pattern is matched:
q
sed -n '/File/,$p;/;/q'