I'm wondering what I'm missing here. I'm trying to create a little script that executes in a terminal session. I'm using bash (the default terminal shell). Here's what I did in a terminal session to try to make one--
$ ed mmm
mmm: No such file or directory
i
#!/bin/bash
echo "Hello World!"
.
w
32
q
$ ls -l mmm
-rw-r--r-- 1 markhenri staff 32 Apr 28 10:24 mmm
$ chmod +x mmm
$ ls -l mmm
-rwxr-xr-x 1 markhenri staff 32 Apr 28 10:24 mmm
$ mmm
-bash: mmm: command not found
$ bash mmm
Hello World!
$ sh mmm
Hello World!
$
Seems like this should be an executable file? On line docs say this is how you do it. Is it something with my rights/privileges? I tried mmm.sh also as well as #!/bin/sh in the first line. The script runs fine if you invoke the shell command before it. Odd?
$ ed mmm
mmm: No such file or directory
i
#!/bin/bash
echo "Hello World!"
.
w
32
q
$ ls -l mmm
-rw-r--r-- 1 markhenri staff 32 Apr 28 10:24 mmm
$ chmod +x mmm
$ ls -l mmm
-rwxr-xr-x 1 markhenri staff 32 Apr 28 10:24 mmm
$ mmm
-bash: mmm: command not found
$ bash mmm
Hello World!
$ sh mmm
Hello World!
$
Seems like this should be an executable file? On line docs say this is how you do it. Is it something with my rights/privileges? I tried mmm.sh also as well as #!/bin/sh in the first line. The script runs fine if you invoke the shell command before it. Odd?