Error when executing script


When I execute the script it gives out the reading on line 3 and 5 that pushd and popd are not found.

I’m running it on the RPi with jessie LITE and the LXDE GUI.

I executed the script from its file location (/sketchbook/libraries/Blynk/scripts)

Anybody knows a fix for those errors?

After that the output continious with trap: SIGNIT: bad trap. But this is probably because of pushd and popd not found?

Also on line 54 it says function not found and then on line 57 it gives a syntax error (unexpected “}”) But I think this is because I don’t AVRDUDE installed.

All help is greatly appreciated! Thnx!

Edit: I tried changing the first line of the script to read .sh instead of .bash but that didn’t work.

This is very strange, Personally I don’t have any ideas why it could happen.
Did you try using ordinary raspbian image?

From what I can tell, those two commands are native to the Bash shell.

Have you tried executing the script from a bash shell?

Did you solve this issue?
I’m having the same problem, this same script works like a charm on OS X, but when trying to run it on Ubuntu i get this output:

./ 3: ./ pushd: not found
./ 5: ./ popd: not found
trap: SIGINT: bad trap
[ Press Ctrl+C to exit ]
./ 54: ./ function: not found
./ 57: ./ Syntax error: "}" unexpected

Any ideas why this could happen?

Sort of. pushd and popd are native to Bash. You have to install them, but I’m not sure how to accomplish that on Ubuntu.

maybe try running sudo bash ./ ?