Anyone had issues with running scripts on Big Sur? I get a command not found error and I’m guessing its a toggle or a command or a back age that needs to be added to enable it or its blocked by default for security reasons?
Running scripts in terminal on Big Sur
I am having the same issue. I use Automator run a 3 line a zsh script that choses a directory and makes two calls to PANDOC. I can run the three lines in a terminal session just fine, but get the error,
The action "Run Shell Script” encountered an error: “zsh:2: command not found: pandoc....."
I have the same issue. How to fix it?
I have the same problem. My three-line shell scripts do not work. Under Catalina, I could solve these problems by sourcing them. Under Big Sur, they just don't work at all. And they all start with #!/bin/bash.
I'm running a shell script in terminal with Big Sur that begins #!/usr/bin/env bash
and it works with both sh script.sh and zsh script.sh
if you add /env does it change anything?
and it works with both sh script.sh and zsh script.sh
if you add /env does it change anything?
I thought it was just me :) being inexperienced.
I set up a Hello World C++ code for my Uni Class and went through all the steps using the Terminal (Bash) on Big Sur after upgrading due to incompatabilities with an external library the uni uses and Mojave; where I was getting an error all the time.
Then, after going through all the stuff again as I noted above I compiled (all good) and went to run it with the ./HelloWorld command... nothing but back to the prompt after about 1 sec. I'm in the right folder etc, etc all triple checked. So tried again and again... same thing.
So leaving that Terminal Window open I Opened a new Terminal Window - effectively starting again. This time all I do is "cd" straight to the code directory, "pwd" to check, "ls -lha" to make sure all my files are there and on confirmation then I do the "./HelloWorld" run command again and YAHOO! It prints the words and goes back to the prompt! So it does work.
All that being said and me not being an expert like you guys, it seems to me there is a refresh issue in terminal that after I compile the code it's either not reading the new HelloWorld executable (in description only) file or needs to refresh itself somehow. Notice its only when I start up a new window after compiling in a previous one using clang++ compiler that it works.
I am also working on a fresh install of Big Sur 11.2.3.
See if it happens for you. If you find a cure it may be a fix for all of us. It may be an Apple bug?
I set up a Hello World C++ code for my Uni Class and went through all the steps using the Terminal (Bash) on Big Sur after upgrading due to incompatabilities with an external library the uni uses and Mojave; where I was getting an error all the time.
Then, after going through all the stuff again as I noted above I compiled (all good) and went to run it with the ./HelloWorld command... nothing but back to the prompt after about 1 sec. I'm in the right folder etc, etc all triple checked. So tried again and again... same thing.
So leaving that Terminal Window open I Opened a new Terminal Window - effectively starting again. This time all I do is "cd" straight to the code directory, "pwd" to check, "ls -lha" to make sure all my files are there and on confirmation then I do the "./HelloWorld" run command again and YAHOO! It prints the words and goes back to the prompt! So it does work.
All that being said and me not being an expert like you guys, it seems to me there is a refresh issue in terminal that after I compile the code it's either not reading the new HelloWorld executable (in description only) file or needs to refresh itself somehow. Notice its only when I start up a new window after compiling in a previous one using clang++ compiler that it works.
I am also working on a fresh install of Big Sur 11.2.3.
See if it happens for you. If you find a cure it may be a fix for all of us. It may be an Apple bug?
How's this going?