Bill Campbell wrote: > On Mon, Feb 16, 2009, David wrote: > >> Bill Campbell wrote: >> >>> The ``swatch'' program, written in perl, does this by using the >>> gnu-tail program via a pipe using. >>> >>> gtail --follow=name --lines=1 file1 file2 ... >>> >>> Use the source Luke. >>> >>> > ... > >> That looks like the right tool for the job at hand. Looking at setting >> up the configuration file, a stumbling block in my learning to program >> is my lack of a good understanding of regular expressions. I have >> started studying grep, sed and awk. It is a lot more fun to just write >> little python programs and watch in amazement when they work as >> expected. I have been avoiding this phase of learning. >> > > Looking at other people's scripts can be very enlightening. When I started > learning Xenix in 1982, there were about 2 books on the subjects, Jean > Thompson's blue one, and I forget the other. I learned a lot by reading > system administration scripts, once I figured out that these were working > programs. > > One of the best books I've ever seen for general *nix text processing and > use of tools is ``Unix Text Processing'' by Dougherty and O'Reilly. It has > been out of print for years, but can probably be found through > bookfinder.com It has lots on regular expressions, using ``vi'', etc. > > There is information on regular expressions in any book on python, perl, > and other scripting languages. O'Reilly has a book ``Mastering Regular > Expressions'' which is probably pretty good, but I have never read it. > > Bill > OK, I found ``Unix Text Processing`` for $5 and I did start ``Mastering Regular Expressions so I have the material, now I just need a photographic memory to speed the process up :) -david
-- powered by Gentoo/GNU Linux http://linuxcrazy.com _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor