I need to extract several lines from active source file. I tried to add grep command to the Tools menu like this (I'm using dummy pattern for the test) :
Name: List ints
Executable: /usr/bin/grep
Parameters: '-e int' ${ACTIVE_EDITOR_FILENAME}
Launch tool hidden with standard output redirected
The tool fails with the following log:
Launching tool 'List ints': /usr/bin/grep '-e int' /media/backup/mylinux/projects/trunk/Manager/Main.cpp (in /media/backup/mylinux/projects/trunk/MrStreamManager)
stderr> execvp(/usr/bin/grep, -e int, /media/backup/mylinux/projects/trunk/Manager/Main.cpp) failed with error 2!
stderr>
stdout>
Tool execution terminated with status 255
What seems to be the problem here? Do I need some quoting tricks?
Thanks.
You don't want the quotes arou8nd the -e flag:
Name: List ints
Executable: /usr/bin/grep
Parameters: -e int ${ACTIVE_EDITOR_FILENAME}
Still has the problem
execvp(/usr/bin/grep, -e, int, /media/backup/m...cpp) failed with error 2!
Quote from: jackhab on October 12, 2009, 12:22:17 PM
Still has the problem
execvp(/usr/bin/grep, -e, int, /media/backup/m...cpp) failed with error 2!
Make sure grep is in
/usr/bin !
On my system (debian) it is in
/bin !
EDIT:You do not need to use the absolute path, if
grep is in your searchpath.
U-N-B-E-L-I-E-V-A-B-L-E ! ! !
It is in /bin. I forgot to 'which grep'. Thank you so much, jens.