Output redirection to file until n number of lines are appended.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
No. didn't knew about --spider. Thanks for that. At least it solved wget's size problem.
I usually apply this technique for most of the programs, where they display most of the information on to screen while they are running. That on screen information is gold mine of data. This problem is some what similar that is discussed here and here.
As i'm from different programming background, i'm struggling on how to do them in bash script.
OK, I made some improvements. I come up with this script. This scripting is working, but I’m pretty much sure even though logic 'maybe' correct, there will be better way to do it. Will anybody please tell me how can I improve on this.
Here I’m using wget as example, but I intend to use this logic for any command which does not provide certain information prior, but gives them when it is running.
The logic is as follows:
Create a empty temp file.
Run any command and redirect output to that temp file.
Wait for the required keyword to be written to that temp file.