Making Script
-
2. Making Bash Shell Script
Then to Create a Bash Script on Home Directory with nano
First, Change to the User’s Home directory with:cd ~
Then to Make the Bash Script with nano play:
nano mybashscript.sh
Now to be Runnable directly as a Shell Script we append a Bash Shebang to the Top like:
#!/bin/bash
Then for our Testing pourpose we Append something like a classic Hello-Word greating:
echo 'Hello World!'
And the ‘echo‘ Bash Command simply Output a String on Terminal.
Finally, our simple Bash Script is containing just:#!/bin/bash date echo 'Hello World!' echo 'From the Bash Shell'
The Bash Commands must be in a Stack of sigle Commands like:
myBashCommand1 myBashCommand2 ...
Or otherwise in a Line of Commands Divided by a ‘;’ SemiColon as:
myBashCommand1 ; myBashCommand2 ...
Ctrl+Shift+v to Paste content into nano.
Use Ctrl+x to Save & Exit from nano Editor.
Contents
Tags: Getting Started Shell Script Lubuntu, Getting Started Shell Script Lubuntu 20.04, Getting Started Shell Script Lubuntu Focal, Lubuntu 20.04 Getting Started Shell Script, Lubuntu 20.04 Quick Start Shell Script, Lubuntu 20.04 Shell Script Getting Started, Lubuntu 20.04 Shell Script Quick Start, Lubuntu Focal Getting Started Shell Script, Lubuntu Focal Quick Start Shell Script, Lubuntu Focal Shell Script Getting Started, Lubuntu Focal Shell Script Quick Start, Lubuntu Getting Started Shell Script, Lubuntu Quick Start Shell Script, Lubuntu Shell Script Getting Started, Lubuntu Shell Script Quick Start, Quick Start Shell Script Lubuntu, Quick Start Shell Script Lubuntu 20.04, Quick Start Shell Script Lubuntu Focal