Computer
Linux Script Examples
It is defined as Linux Script as the simple programming code that contains commands or commands which are executed sequentially.
This tool is used to control the behavior of a specific program or to interact with the operating system, in this way we can structure the commands that you want to execute through the keyboard. This technique can be easily opened with two techniques, one from the text editor of the graphical environment or from the terminal with Vim.
10 Linux Script Examples
- Bin / bash.
This is the first line of the script.
Value = 4
While (0-1t $ value).
Echo “$ value”
Sleep $ value.
Value = expr $ value -1.
Donate.
- Files = tar –tg tar file.
Tar –xf .tars file.
For in $ files; do.
Grep = grep “I’m looking for you” -m4.
Cat $ i.
- Echo send – / exit / temp.exp.
- Set timeout -1 temp.exp.
- Sleep .1 exp temp.
- Expect / * / temp. exp.
- The tasks that are repeated can be grouped by means of a script so that they can be executed.
- Commands are written separately with line breaks.
- A plain text editor is used.
- Always in the first line you must indicate which script should be used to be able to interpret the rest of the commands well.
- To be able to execute the scrpt, you must type the name of the file and that way the characters are interposed.
- Commands should always be phrases that you can easily remember.
- Repetitive names can be soup, meat, bread, garlic bread, today we will eat among others.