I'm new to Linux. I'm trying to make a script that prints something and initiates a shutdown command. This is my script:
#!/bin/bash
echo Hello WOOOOORRRRRLLLLDDDDDDD
echo sudo poweroff
Every time I try to run my script,using
chmod +x Hello World BASH
or ./Hello World BASH
however, I get this error message:
chmod: cannot access 'Hello': No such file or directory
chmod: cannot access 'World': No such file or directory
chmod: cannot access 'BASH': No such file or directory
In general, everytime I try to run this script, the "no such file or directory" error message popped up. How can I fix this?