You need to log in to create posts and topics.

How to Run Shell Scripts on a Text Editor?

Yes, It is possible to run shell scripts on a text editor. In this tutorial, we will show you how to run shell scripts in the text editor.

Method 1:

 

You can use the KATE KONSOLE. Follow the below instructions below.

  • You need to run the below command

sudo dpkg --configure -a

Run DKPG configuration

  • Now you need to install the Kate Konsole, You can use the below command

sudo apt install kate konsole

Installing Kate Konsole

  • Now, go to Kate -> Settings-> Configure-Kate-> Application-> Plugin

Enable Terminal Tool View

Once you have done, click the OK button.

  • Type any shell script in the text area
  • Save the file with the Bash extension

Run Shell Scripts

  • Click the Terminal to enable the "Terminal View"
  • Now go to the option "Tools" and click the "Pipe to Terminal" option

Pipe to Terminal

  • Confirm the "Pipe to Terminal" option.
  • The "Shell Script" will run into the Terminal, executes it and print the output file in the terminal

Shell Scripts executed in the Terminal

That's it. This is how you can run the Shell Scripts in the Text Editor.