I'm doing a project where the user runs a .sh file which will then run a executable .sh file.

The file is called wifi.sh and then inside this is the file location to fluxion.sh, but when it runs, it does not run the fluxion program. How can I get this to work.

  • 3
    Could you please show (in the question, not comments) what happens you try to run the wifi.sh script? – Kusalananda Mar 8 '18 at 10:22
  • How do you know, that fluxion.sh isn't run? How is it invoced (let's see the code!). How do you invoke wifi.sh? Shebang issues, file attributes, PATH issues, permissions, conditions in the outer script, ... - Error message? – user unknown Mar 8 '18 at 16:18

It depends slightly in which context you plan to run fluxion and what should happen, once that tool terminates.

Option I: exec

Features: does not return, saves processes


echo this code is never reached

Option II: just calling

Features: does return, maximum simplicity


echo "I just returned from $PATHTOFLUXION"

Option III: source

Features: If the called tool is in turn a shell script that also sets variables you want to access after the tool exited, these are preserved.

echo "$PATHTOFLUXION was a shellscript and set $DATAFROMFLUX"
  • ls -l $PATHTOFLUXION might be more informative. – user unknown Mar 8 '18 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.