Raspberry Pi_Eng_20.2.1 Shell and script

20.2 Batch Run of Commands via Script

Here we will look at the script tool we use to process multiple commands in batch at once. We will discuss the concept of script, how to write a script, how to execute a script, and so on.

20.2.1 Shell and script

20.2.1.1 What is Script?

On Linux systems, Shell plays a central role in executing commands. Among the various Shell programs, BASH is specified as the default shell. BASH receives a command entered by the user in the terminal environment, interprets the meaning of the command, processes the command according to the specified method, and returns the processing result to the user.

Raspberry Pi_Eng_20.1.2 Manual Run and Automatic Run

20.1.2 Manual Run and Automatic Run

Based on the subject who instructs the processing, the processing method can be divided into the manual execution and utomatic execution can

● Manual execution

In this method, the user instructs to process certain commands. The user determines the required point of time for execution, and the user also determines the contents of the specific command to be entered for execution and instructs the command. The command to be executed here may be an individual command or a bundle of commands defined by a script. Whatever it is, the user will decide the start of the run.

Raspberry Pi_Eng_20.1.1 Individual Run and Batch Run

20.1 How to Run Command

There are several ways to execute commands in the Raspberry Pi system. Users can run them one by one, or the computer can handle them automatically. We will take a look at what methods can be used here.

20.1.1 Individual Run and Batch Run

Based on the number of command processed at one time, the processing method can be divided into individual execution and batch execution.

Raspberry Pi_Eng_20.0 Chapter 20 Batch Run and Automatic Run

Chapter 20 Batch Run and Automatic Run

Chapter’s Main Topics

This chapter describes the several ways to execute commands on a Linux system. You can execute commands one by one, or you can execute several commands at once. You can also run it manually or let the system run automatically.

In this regard, we will look at the Script tools we use to process multiple commands at once. We will also look at tools that can execute commands at regular intervals.

It includes descriptions on the following topics:
■ Individual execution and batch execution

■ Manual execution and automatic execution

■ Batch execution with script

■ Automatic execution with init script

■ Automatic execution by schedule