Equivalent of a "mdfind" query in Ack: AND operator + -interpret switch

view story

http://stackoverflow.com – I am trying to modify Brett Terpstra's handy QuickQuestion script for my Linux machine. What would be Ack's equivalent to the following mdfind commands: mdfind -onlyin "$NOTESDIR" "filename:.$NOTESEXT AND filename:\"$NOTESPRE\" AND ${INPUT%\?}" ... echo "`mdfind -onlyin \"$NOTESDIR\" -interpret \"filename:.$NOTESEXT AND filename:$NOTESPRE AND ${INPUT%\?}\"`" I can't seem to get the AND part right. I understand that one has to use parentheses since Ack is Perl. But for example (?="$NOTESPRE")(?="$INPUT") gave errors. Furthermore, I am not sure what to do with the -interpret switch on the se (HowTos)