On Wednesday 22 April 2009 08:46 am, Randall Whitman wrote: > Ah, between reading your first message and the never-mind followup, > > i had already scribbled out: > > perl -wne 'chomp; print "blah1 $_ blah2\n";' > > e.c > blah1 e.c blah2 > e.o > blah1 e.o blah2
Being I'm not a perl guy, I don't understand. Perhaps the next time we end up at a meeting together, or if I drive up to your neck of the woods one of these days, you can show me the exact code. Here's what I used in my shell script: <snip> for domain in `grep "^zone" ./zones/$ip.named.conf | cut -d"\"" -f 2` do SLAVELINE="zone \"$domain\" { type slave; file \"$dnspath/$ip/$domain.db\" ; masters { $ip; }; };"; echo "${SLAVELINE}" >> ./zones/slaves.named.tmp; done </snip> To make it easy to get around the word-wrap, I've doublespaced the lines; the line that begins with SLAVELINE, and wraps, is all one line. My code (above) does some grepping that I had originally planned on doing first. Not as elegant as yours, but not bad for a do-it-myself project from someone who doesn't ever do shell programming <smile>. Thanks, though! Jeff -- Jeff Lasman, Nobaloney Internet Services P.O. Box 52200, Riverside, CA 92517 Our jplists address used on lists is for list email only voice: +1 951 643-5345, or see: "http://www.nobaloney.net/contactus.html"