[mICQ] fix generate .cvsupdate in cvs version

Maxim Komar komar at ukr.net
Sat Apr 7 05:50:42 CEST 2007


On Fri, Apr 06, 2007 at 01:38:01PM +0200, R?diger Kuhlmann wrote:
>> +  -e 's/.* \([^ ]\{1,\} [^ ]\{1,\}\) [^ ]\{1,\} [^ ]\{1,\} [$$].*/#define CVSUPDATE "\1 UTC"/' \
>> +  | sort | sed -ne 's,/,-,g' -e '$$p' > .cvsupdate
>I'm not convinced that all sed implementation get { } right, as well
>as the $ line address. Check Solaris.
In my scripts I not use gnu-sed extention. This is standart
features of sed and regex.

http://bama.ua.edu/cgi-bin/man-cgi?sed+1
===
sed Addresses
    An address is either empty, a  decimal  number  that  counts
    input  lines  cumulatively  across files, a $ that addresses
    the last line of input, or a context address, which consists
    of  a  /regular  expression/  as  described on the regexp(5)
    manual page.
...
SunOS 5.9           Last change: 23 Jul 1998                   12
===

http://bama.ua.edu/cgi-bin/man-cgi?regexp+5
===
     2.3   A one-character  RE  followed  by  \{m\},  \{m,\},  or
           \{m,n\} is a RE that matches a range of occurrences of
           the one-character RE. The values of m and  n  must  be
           non-negative  integers  less  than  256; \{m\} matches
           exactly m  occurrences;  \{m,\}  matches  at  least  m
           occurrences; \{m,n\} matches any number of occurrences
           between m and n inclusive. Whenever a  choice  exists,
           the RE matches as many occurrences as possible.
...
SunOS 5.9            Last change: 2 Apr 1996                    8
===

But, if you want, this is not problem not use them.
===
    -e 's/.* \([^ ][^ ]* [^ ][^ ]*\) [^ ][^ ]* [^ ][^ ]* [$$].*/#define CVSUPDATE "\1 UTC"/' \
    | sort | tail -$(POSIX)1 | tr / - > .cvsupdate
===

-- 
Signature invent in progress 23% ##........
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://micq.org/pipermail/micq-list/attachments/20070407/f167685f/attachment.pgp 


More information about the mICQ-List mailing list