Bash It is considered as an interpreter of the commands in programming, and that contributes in the creation of the scripts.

How to create a script?

Making a script is not complicated, you just have to make sure to follow all the instructions that we leave you, below:

  • The first thing you have to do is open a terminal, and there you must write the following command: cd $HOME && touch && chmod +x
How to make a script executable
  • Then, you must press the key ''Enter'', and you will have already created the file in one of your home folders.
  • To continue you must place in the terminal: cd $HOME && echo '#!/bin/bash' > && echo '# -*- ENCODING: UTF-8 -*-' >>
  • And, voila, the script is ready.
  • When it opens, the following appears: #! / Bin / bash # - * - ENCODING: UTF-8 - * -
  • To continue after ''-'' You must place the instructions that you want it to comply with.
  • And, voila, the script is completely created to display any sentence you want.

Note: If in doubt, the terminal is the program that will carry out all the command line actions.

How to create a new script file?

  • In the toolbar you should look for the option ''New''.
How to create a new script file?
  • You can also do it by entering the menu ''Archive''.
  • The new file should appear in a new file tab, but still in the PowerShell one.
  • It is important to note that these types of tabs can only be seen when there is more than one.
  • The default name of the file is .ps1, however, this can be changed, as well as the extension.

How is a script executed?

  • The first step is to find the folder where the script is saved.
  • Generally, they are kept in personal folders.
  • After getting the script, the next thing you should do is open a terminal, and press the ''Enter'', once written cd $ HOME.
  • The next step is to execute it, this is achieved by placing a point, and the slash before the word ''script'', that is to say: ./
How a script is executed
  • Finally, what you should do is place ''exit''.

How is a part of the script executed?

  • In the script panel you must select the part you want to execute.

Once selected, you must enter the menu ''Archive'', and click on ''Execute selection'', or simply on the toolbar.

  • And voila, you are already executing the part of a script.

How to stop a script that is running?

There are many ways in which you can stop the script that is running, but it is important that you follow the steps that we leave you:

  • From the toolbar, you have the option to select the option to ''Stop the operation''.
  • You can also press the keys CTRL, and of Interrupt.
  • Click on the menu ''Archive'', And in ''Stop the operation''.
  • Another way is by pressing ''CTRL+C'', this only when there is already a text that has been selected. If it does not exist, what the combination of these keys will do is copy a text.