How to Create a Shell Script in Linux

How to Create a Shell Script in Linux

Do you want to create a Shell script in your Linux system?

This guide will take you through how to create a shell script using multiple text editors, how to add comments, and how to use Shell variables.

But before heading over to creating a shell script, let’s understand what Shell scripting in Linux is.

What is Shell Scripting in Linux?

So, what’s Shell scripting?

Shell Scripting is defined as an open-source program that’s run by Linux or Unix shell. Through shell scripting, you can write commands to be executed by the shell.

Lengthy and repetitive commands are usually combined into a simple command script. You can store this script and execute it whenever needed. 

Shell scripting in Linux makes programming effortless.

Ways of Creating a Simple Shell Script in Linux

Creating a simple shell script in Linux is very easy. You can do that using multiple text editors. This tutorial will show how to create a shell script with two different methods, such as 1) using the default text editor, and 2) Using the Vim text editor tool.

Method 1: Using the Default Text Editor

To create a shell script using the default text editor, just follow the steps given below.

Step 1: Create a text file having a “.sh” extension. Then type a simple script.

Shell Script

Step 2: Now don’t change the directory. And open the terminal. Using the command below, give executable access to the file created.

chmod +x

Step 3: Execute the below-given script in the terminal:


This was a simple technique of creating a shell script in Linux using the default editor. Now, let’s look at the next method.

Method 2: Using the Vim Text Editor Tool

Vim text editor tool is a tool that helps create a shell script in a Linux system. In case you don’t have it already installed, use the command to install Vim:

sudo apt install vim

Now follow the steps for creating a shell script using the tool.

Step 1: For opening the editor, simply type:


Step 2: Once you’re in, open the terminal. Then create a bash file via:


After the execution of the command, the editor will appear as below.

SQLite Extraction of Oracle Tables Tools, Methods and Pitfalls



The SQLite database is a wildly successful and ubiquitous software package that is mostly unknown to the larger IT community. Designed and coded by Dr. Richard Hipp, the third major revision of SQLite serves many users in market segments with critical requirements for software quality, which SQLite has met with compliance to the DO-178B avionics standard. In addition to a strong presence in aerospace and automotive, most major operating system vendors (including Oracle, Microsoft, Apple, Google, and RedHat) include SQLite as a core OS component.

There are a few eccentricities that may trip up users from other RDBMS environments. SQLite is known as a “flexibly-typed” database, unlike Oracle which rigidly enforces columnar datatypes; character values can be inserted into SQLite columns that are declared integer without error (although check constraints can strengthen SQLite type rigidity, if desired). While many concurrent processes are allowed to read from a SQLite database, only one process is allowed write privilege at any time (applications requiring concurrent writers should tread carefully with SQLite). There is no network interface, and all connections are made through a filesystem; SQLite does not implement a client-server model. There is no “point in time recovery,” and backup operations are basically an Oracle 7-style ALTER DATAFILE BEGIN BACKUP that makes a transaction-consistent copy of the whole database. GRANT and REVOKE are not implemented in SQLite, which uses filesystem permissions for all access control. There are no background processes, and newly-connecting clients may find themselves delayed and responsible for transaction recovery, statistics collection, or other administrative functions that are quietly performed in the background in this “zero-administration database.” Some history and architecture of SQLite can be found in audio and video records of Dr. Hipp's discussions.