I downloaded Yara from Git. When I run yara from terminal, it works as I would expect. I want to know if it's possible to create a bash script that would let me call yara and then execute my command.
Any help would be greatly appreciated!
yara -w /path/path/path works in terminal
yara -w in a shell script does not execute as I would want.
When you run it from shell, your environment is set.
For e.g., if your default shell is bash, then ~/.bashrc
or ~/.profile
sets them (/etc/profile
is sourced as well).
Via Xcode, this doesn't happen automatically. So, $PATH
doesn't have the location for yara
.
You may:
yara
from Xcode
~/.bashrc
or ~/.profile
in Xcode
(if there's such an option)) before using yara
$PATH
settings in Xcode
to point to the location where yara
is installed. You can find it by running which yara
in the shell.