PROXY  WHOIS  RQUOTE  TEXTS  SOFT  FOREX  BBOARD
 Music  Philosophy  Code  Literature  Russian

= ROOT|Technical|LinuxGazette|issue110.txt =

page 8 of 91



   Today, I found `pcregrep` and it behaves exactly like the perl compatible
   regular expression from php and perl since it does in fact use the same
   engine. Now I have only one regex syntax to know in detail, and my regexs
   work the same everywhere. 

   Now, I can say things like: 

   pcregrep -r ^[ae].*?log$ * 

                                 ...............
            ____________________________________________________

Adding custom headers in Thunderbird

   Andy Burns ([82]andy.burns from adslpipe.co.uk)
   Answered By Brian Bilbrey, Jimmy O'Regan

     (!)  [Jimmy]  This  is  a  follow-up  to  a  2c  Tip  in  LG  #109:
     [83]http://linuxgazette.net/109/lg_tips.html#tips.1

   I stumbled across your article on mozilla/thunderbird headers (I'm only an
   irregular reader) 

   I  had  a  look  an  the "mheny" extension, because I like the idea of
   customising the viewed headers, but I found that it CAN also control the
   headers used at composition time. Not sure if you "summarized this out" of
   your article, or didn't find it to start with ;-) 

   Within the option dialog for mheny extension, select custom headers from the
   tree on the left, then pick composition from the drop list on the right, and
   you can select existing fields or add/remove custom fields, which then show
   up when you compose a message. 

   However (and I think this means it still doesn't fit your need) you can't
   add a default value for a field. 

     [Brian] And that's the bingo value: I did try mnenhy, but what I really
     want is a constant X-blah header containing a specific value every time I
     send an email via Mozilla Thunderbird.

   Still a useful find, thanks ... 

     [Brian] But you got farther than I did, thanks for the heads up, I'll work
     some more with mnenhy when I get a chance. Of course, that I just spelled
     the name of the extension right twice only shows that I had to look it up
     twice, inside of a minute or two.

     [Jimmy] I came across this:
     [84]http://www.picklematrix.net/archives/000969.html it turns out it /is/
     possible to add values to headers in Mozilla

     add something like this to your prefs.js (not user.js):

user_pref("mail.identity.id2.headers", "tag");
user_pref("mail.identity.id2.header.tag", "X-gazette-tag: Jimmy");

     (id1 is the 'local folders' identity)
            ____________________________________________________

Counting braces

   Amod C Damle ([85]amod_cd from rediffmail.com)

   i am learning from your website "Linux Gazette" by which i am finding it
   easy to learn unix. 

   but i am having problems compiling and debugging the following program ...
   can you please help me out with its solution. 

   using UNIX filters and awk to write a shell script to filter out comment
   statements in a C program 

   a shell script to count the number of parentheses and braces in a C program 

   a shell script to recognize function calls in a C program 

   a shell script to generate code to do profiling of a C program (to insert
   counters to the C program) 

   using filter or just grep, sed and awk) 

   hoping  for  some guidence sincerely Amod Damle (ILLINOIS INSTITUTE OF
   TECHNOLOGY-CHICAGO) 

     [Sluggo] The first thing you should see is the TAG Posting Guidelines
     [86]http://linuxgazette.net/tag/ask-the-gang.html in the FAQ section.
     There you'll see we don't do people's homework for them. How do we know
     it's homework? You don't want to do a useful task: who cares how many
     braces a C program has? You choose the tools first and then the strategy,
     and you insist on using kludgey tools. If I really wanted to count braces,
     I would write a Python program.

#!/usr/bin/env python
"""count-braces.py

Usage: count-braces.py <filename
Print the number of {}() characters in the input file.
"""
import re, sys

=8=

1|2|3|4|5|6|7| < PREV = PAGE 8 = NEXT > |9|10|11|12|13|14|15|16|17.91

UP TO ROOT | UP TO DIR | TO FIRST PAGE

Google
 


E-mail Facebook Google Digg del.icio.us BlinkList Fark Furl Ma.gnolia Netscape NewsVine Reddit Slashdot Spurl StumbleUpon Technorati YahooMyWeb LiveJournal Blogmarks TwitThis Live News2.ru BobrDobr.ru Memori.ru MoeMesto.ru

0.011914 wallclock secs ( 0.01 usr + 0.00 sys = 0.01 CPU)