bug-recutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-recutils] use of


From: John Darrington
Subject: Re: [bug-recutils] use of
Date: Wed, 19 Apr 2017 06:55:50 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Apr 18, 2017 at 08:30:48PM -0400, Charles Millar wrote:
     I am attempted to construct a recsel SEX for the following Contacts.rec
     file  that will result with Person 1 and Person 3
     
     Name; Person 1

The semicolon is not appropriate here.  A colon is required.

     Tag: This
     Tag: That
     Tag: These
     
     Name: Person 2
     Tag: These
     Tag: This
     
     Name: Person 3
     Tag: That
     Tag: These
     Tag: This
     
     Name: Person 4
     Tag: This
     Tag: Those
     tag: These
     
     Name: Person 5
     Tag: That
     
     One of my attempts
     
     recsel -e \( 'Tag ~ "This"' && 'Tag ~ "That"' \) -P Name Contacts.rec

     returns the command prompt only (no error message)

That is odd.  It returns an error message for me: 
 recsel: error: invalid selection expression
which is what I would expect since '(' alone is not a valid expression.

I guess what you meant to type is something like:

 recsel -e '(Tag  = "This" || Tag = "That" )' -P Name Contacts.rec


Note that in your example || is probably what you want, not && since there is
no Tag field which matches both "This" and "That".

     Please note that "Tag" is the field name (label) and that the field
     values for "Tag" may entered randomly, and sometimes later when the rec
     file is updated and that each contact may have any number of "Tags".
     Therefore I do not believe that using subscripts such as Tag[1] would be
     useful.
     
     Also, the "recsel -e 'Tag ~ "This"' -P Name Contacts.rec" does return a
     lsit of Persons 1 - 4

This one *does* work for me (as I would experct).

Which version of recutils are you using?  And which shell are you using?
     

-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]