i need to write a program, to fetch a number, when i enter the number as input, it should display from the number which i gave as input to the preceeding number the file may be like this

B456
---------------
---------------

b567
----------------
----------------

g678
-----------------
-----------------
link|improve this question
2  
Yadayada, 1) wrong site (should belong to StackOverflow), 2) poor question, 3) you won't get full source code here, because people want so see that you have put at least some effort into your question (like formatting it properly). – slhck Mar 31 '11 at 7:11
grep <number> <file> -C 4 | head -n 1 – Sirex Mar 31 '11 at 8:40
That should do it. ^^^ – Sirex Mar 31 '11 at 8:41
feedback

closed as off topic by kez, Mike Fitzpatrick, Bobby, Sathya Mar 31 '11 at 7:20

Questions on Super User are expected to generally relate to computer software or computer hardware, within the scope defined in the faq.

Browse other questions tagged or ask your own question.