Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Anakata17254y@metamourge my Mac is using Zsh. And the script is in bash (I forked the repository from GitHub). Could that be the reason?
-
@srpatil
Just look if the hashbang is a valid path on your system,
If not, change it. -
Change the shebang to #!/usr/bin/env bash, if it happens to be the issue. This will make the script more portable.
-
@srpatil weird, lack of executable permition yelds a 'permission denied' kind of error in linux. It's weird to see that mac gives you a not-found err instead :)
-
Anakata17254y@netikras yes I got “permission denied” message at first. So I ran the file using sudo ./ which prompted me to enter the password after which it gave the “command not found” error message.
Related Rants
-
purist16Feels great to write a script that downloads consecutive episodes of a series sequentially .. All because.. H...
-
FancyDeveloper6!rant A rather long(it's 8 hrs long to be precise) story So I just finished an amazing homework assignment. T...
-
CodeBlooded5Meanwhile, I wonder what non-tech people would think if they saw my search history.
I wasn’t able to run a bash script right now using ./script.sh as I was getting an error “Command not found.” I tried running it using source command instead of ./ and it worked! What’s going on here?
question
bash script
shell scripting