《问》How to create a shell script on Ubuntu/MacOS?

《问》

How to create a shell script on Ubuntu/MacOS?


create a bash script

nvim hello.sh

edit the file "hello.sh"

#!/bin/bash
echo "Hello, World!" 
echo "Knowledge is power."

set execute permission for this script hello.sh

chmod +x hello.sh

run the script

./hello.sh

Comments

Popular posts from this blog

英语字母a的发音