Index Keywords

↶ Return Home

How to Create a Bash Script

Last Updated May 3rd 2022, 12:41:16 am

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