head -10 as.c | tail -6 Sample O/P
r...@hp-laptop:~/ds# *cat as.c* #include<stdio.h> int main() { char a; int b; short c; double d; clrscr(); a=b=0; c=d=1; a++;--b;c++;--d; printf("%p,%p,%p,%p",a,b,c,d); } r...@hp-laptop:~/ds# *head -10 as.c | tail -6* char a; int b; short c; double d; clrscr(); a=b=0; where as.c is input file head will return first 10 lines tail will return 6 lines from last.... tats it.... On Wed, Sep 22, 2010 at 2:34 AM, Divesh Dixit < dixit.coolfrog.div...@gmail.com> wrote: > How to get line no. 5 to line no. 10 only from a file.. using tail > or head command.? > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.