Post

Bash script

1️⃣ In text editor, type the script you want

💡 where: text editor ✔️ save the file with .sh ✔️ for example, gitblog_clone.sh

image

  1. start with #!/bin/bash
  2. echo "WHAT I WANT TO PRINT"
  3. commands

2️⃣ Make the script executable

💡 where: terminal ✔️ navigate to directory where the script file is located

1. Make script executable

1
2
## chmod +x [[SCRIPT FILE.sh]]
chmod +x gitblog_clone.sh

2. Run the script

1
2
## ./[[SCRIPT FILE.sh]]
./gitblog_clone.sh

Screenshot 2024-05-24 at 16 54 11

This post is licensed under CC BY 4.0 by the author.