Writing scripts requires knowledge of a specific programming language and general principles:
- use of variables;
- loops;
- working with strings.
An ordinary hosting user does not need to learn how to write scripts on his own. This skill may be required if one decides to engage in programming professionally.
If you just need to add interactivity to your site, you can use ready-made scripts in JavaScript.
Users of virtual hosting also need to study the instructions on the use of scripts, for example, to properly configure their execution on a schedule. The instructions will specify in what place of a particular file to place the text of the script.
The easiest variant is the Shell scripts, which are a set of Linux commands executed one by one, but even in this case, you should understand the meaning of a particular command and present the results of its execution.
For example, a simple script can be created and run directly from the command line in the console.
It is enough to just type
pwd ; whoami.
And then finish the commands by pressing Enter.
This line contains two commands separated by semicolons.
pwd – (present working directory) command prints the directory you are currently in.
whoami – the command prints the user name (login).
The Shell interpreter will execute the commands one by one and the result will appear on the screen.