You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Alternative search command for Linux: ack/grep + find instead of mdfind? #3
Hi Brett,
There are probably many Linux users interested in using qq. Hence a suggestion/tiny please: would you mind adding an alternative search command that utilizes ack or grep instead of mdfind?
The corresponding line could simply be added to the shell script, but it could be commented out by default.
But it's not working properly, apparently due to some issues with cat -- here's my log. As you can see, one of the "answer" lines is also printed twice for some reason:
[mart@arch]$ ./qq -a "question one" "answer"
Question added and answered.
[mart@arch]$ ./qq answer
Q: answer?
A: cat: answer: No such file or directory
cat: answer: No such file or directory
cat: answer: No such file or directory
I also tried this:
ANSWER=`grep -r --include="??*.txt" "$INPUT" $NOTESDIR | head -n 1`
but that returned "Sorry, I don't know the answer..." to every query.
Due to the need for regular sudo updatedb etc, the script won't be as responsive on Linux as it is on OSX. But can you please help? Thanks!
Activity
marttt commentedon Jul 15, 2013
A minor update: I'm pretty much an end-user, but I came up with this:
But it's not working properly, apparently due to some issues with
cat-- here's my log. As you can see, one of the "answer" lines is also printed twice for some reason:I also tried this:
but that returned "Sorry, I don't know the answer..." to every query.
Due to the need for regular
sudo updatedbetc, the script won't be as responsive on Linux as it is on OSX. But can you please help? Thanks!ttscoff commentedon Jul 31, 2013
From TJ Luoma:
marttt commentedon Jul 31, 2013
You made my day. Thanks very much!