LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How to implement "more" command? (https://www.linuxquestions.org/questions/programming-9/how-to-implement-more-command-557982/)

ajaykr 05-31-2007 07:49 AM

How to implement "more" command?
 
Hi,
I am trying to implement "more" command using C, but did not get any such useful information except how to use that command through google. Any help in this is highly appreciated, Any one could help me out to implement this command?

Thanks and Regards,
Ajay,
ajaykumar.m@tcs.com

pixellany 05-31-2007 07:54 AM

Do you mean call the bash "more" command from a C program?

Or maybe you want to write a C program that does the same thing as "more"??

What is the ultimate objective? (eg is it homework?)

ghostdog74 05-31-2007 07:56 AM

Quote:

Originally Posted by ajaykr
Hi,
I am trying to implement "more" command using C, but did not get any such useful information except how to use that command through google. Any help in this is highly appreciated, Any one could help me out to implement this command?

Thanks and Regards,
Ajay,
ajaykumar.m@tcs.com

you can take a look here
to get some idea

ajaykr 05-31-2007 08:08 AM

My intention is to write a C program which behaves exactly as "more" command does. Its not a homework for me, rather I came accross this while enhancing a product command, it can only be solved by adding this implementation.

ghostdog74 05-31-2007 08:24 AM

Quote:

Originally Posted by ajaykr
My intention is to write a C program which behaves exactly as "more" command does. Its not a homework for me, rather I came accross this while enhancing a product command, it can only be solved by adding this implementation.

you can look at the source codes to get some inspiration. download the link i give, unzip and inside there's a more.c file. not sure is it what you want..but at least it can get you started. otherwise, searching google code search may produce more results.


All times are GMT -5. The time now is 12:04 AM.