- open teminal
- create file
- e.g. touch test.sh
- use any editor to write shell script
- e.g. By using vim editor
- vim test.sh
- i < - used to insert or write in file
- Write your code ( example )
- To save and exit
- press ESC button and write :wq! and press enter
- To run shell script
- ./test.sh
How to write and execute shell script?
May 08, 2023
0
Tags