I have a main script1 where i call functions that are inside script2, which i import with source
. When the function inside script2 is called, it calls another function in script2, but commands error out with "X command not found". Am i importing the file wrong or is there something else going on?
script1.sh:
#!/bin/bash
source ./script2.sh
get
# the script crashes due to jq command not found
script2.sh:
#!/bin/bash
get(){
jq ...
echo "So far so good, command goes through."
dosomething
}
dosomething(){
echo "Here the command fails with jq command not found :("
jq ...
}