Code Monkey home page Code Monkey logo

Comments (4)

mm2270 avatar mm2270 commented on September 28, 2024

Hi @benducklow !
Wanted to get back to you on this. The reason you're seeing that error is because you're overriding the script's interpreter, aka shebang, by calling it as sh /path/to/script.sh When you do this, it tells Terminal to run the script as a Bourne shell script, but its coded as a Bash script, #!/bin/bash vs #!/bin/sh
Some of the syntax used in the script is bash specific, such as the process substitution command. The syntax looks something like this in general:

while read line; do
    echo "$line"
done < <(ls ~/Documents/)

This doesn't work in /bin/sh, but does in /bin/bash. As long as the script is executable, just call it by its path and name in Terminal and it should run, i.e. /path/to/script.sh and it should work.

Try that and post back if there's still an issue, but I'm pretty certain that will solve it for you.

Cheers.

from casper-api.

mm2270 avatar mm2270 commented on September 28, 2024

Hi @benducklow, just checking in again. Did my post above help solve this for you? I'd like to close this issue if so. Please let me know, thanks.

from casper-api.

benducklow avatar benducklow commented on September 28, 2024

Yes, just running the script via the /path/to/script.sh without any prefixes was the trick. Thanks much for the responses (and the script)!

from casper-api.

mm2270 avatar mm2270 commented on September 28, 2024

Good to hear its working now. Thanks for the reply.

from casper-api.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.