I have a script that I'm trying to run but I just get the error ": command not found" whenever I try to run it. Here's what I've tried to do to fix it:
- Made sure the hashbang is correct "#!/bin/bash"
- Run dos2unix on the file
- Run the script as scriptname.sh, ./scriptname.sh, and /bin/bash scriptname.sh
- chmod 755 scriptname.sh
I still am unable to run the script. Any help is much appreciated!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…