./ Dot Slash not working to execute Shell Scripts

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


./ Dot Slash not working to execute Shell Scripts



I'm definitely a command line novice. I have recently lost the ability to execute shell scripts using


./script.sh



I am still able to execute shell scripts using:


sh script.sh



My $PATH is as follows:


/Users/goodguy/.pyenv/shims:/Users/goodguy/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin:/opt/local/sbin:/Users/goodguy/.rvm/bin



I am using MacOS. I'd appreciate any insight into what I may be doing wrong





Perhaps it doesn't have the executable flag set. Check with ls -lart script.sh and look for x. You can set it to executable using chmod +x script.sh
– Matthew Darnell
14 mins ago


ls -lart script.sh


x


chmod +x script.sh









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Visual Studio Code: How to configure includePath for better IntelliSense results

Spring cloud config client Could not locate PropertySource

Regex - How to capture all iterations of a repeating pattern?