shell script is a computer program that is designed to be run or executed by the command-line interpreter Unix shell.
Termux is an Android application which creates a Linux environment inside Android where almost every Kali Linux commands can be executed.So termux can be used to learn shell scripting.
In this tutorial we will create a simple bash file and execute it with Termux.
How to write hallow world shell script in termux
Follow the steps below to create a simple bash file with Termux
Step1
Open your termux application then update and upgrade all termux packages
Step2
You will need a text editor to create a bash file ,So Install the vi editor on Termux
Step3
Now create a new bash file demo.sh with the vi Text editor
Step4
A new window Will be opened press the I button and and paste all the code which I have written below 👇
#!/bin/bash
echo hallow world
Now save the file by pressing Esc+:wq+ENTR
Step5
Now make the demo.sh file executable by
Step6
Now execute the bash file demo.sh with the Syntex
Or
It will print the message Hallow world on the termux screen.
0 Comments