Here is the simple script.sh
file I have:
#!/bin/bash
pwd
date
ls -lg
I have used chmod +x
to make the file executable, but when running it with ./script.sh
I get command not found: pwd
command not found: date
and only the ls -lg
command works. I'm a bit perplexed as to why the first two commands aren't working because when I type them into the command terminal they work the way they should.