I'm trying to make a Bash shell script but it is not working. Here is the contents of the script:
#!/bin/bash pwd I would expect this to print out the current directory. Instaed, it prints this:
: not found: build.sh: #!/bin/bash : not found: build.sh: : not found: build.sh: pwd Why is it doing that? I can't find any articles of other people having this problem.
I did chmod 777 on the script, and am running it like so:
sh build.sh 
chmod 777(do you really want all users to be able to edit the script?), and run scripts with./build.shrather than explicitly usingsh.