Phạm Quyết
New member
How do I create a script in Ubuntu?
Answer
How to Write a Shell Script Using Bash Shell in Ubuntu
Answer
How to Write a Shell Script Using Bash Shell in Ubuntu
- Launch the Terminal.
- Launch the vi/vim editor.
- In the terminal window, type vim ListDir.sh and hit ↵ Enter .
- At the top, type the following code: #!/bin/bash .
- Type the code as shown in the figure.
- Type the following key combinations, Esc + : + wq to escape the editor.
- Enter the following command: chmod +x ListDir.sh.