Tag:Writing shell scripts
-
How to write and run Linux shell (. SH) scripts
Write your first shell script Write. Sh file in GEDIT and save it as a.sh. code: #! /bin/bash # employ bash shell player1=xiaoming # define a player1 player2=ken echo “Game start! $player1 $player2” # echo is used to printf in terminal Call the script at the terminal, locate the directory, and then enter: bash a.sh […]