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
-- 
INTERNET:   b...@celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186

About all I can say for the United States Senate is that it opens with
prayer and closes with an investigation. -- Will Rogers
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to