xcodebashshellterminalyara

Call terminal input at start of bash script


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.


Solution

  • 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: