# Unable to execute Wolfram script by calling a package

I am working on a script which loads a package called test. When I try to run the same from my command line, I am seeing my input printed without execution.

Notebook execution:

Needs["test"];
test["foo"]


Output1

Command line execution:

Needs["test"];
test["foo"]


test["foo"]

Am I missing something here?

• Is the package on your \$Path? Use FindFile` to see if Mathematica can find it. – Szabolcs Sep 30 '19 at 15:48