Search Articles   Keywords



How to Create a Bash Script

How to Create a Bash Script


  1. 1. Description
  2. 2. Instructions

Description

How to create a bash script.

Instructions

Create a new file,

nano script-file

Example script-file content:

1
2
3
4
5
6
7
8
#!/bin/bash
# This is my script

echo What is the input?

read userInput

touch $userInput

Make the script-file executable,

chmod +x script-file