1. Execute multiple commands in one line When executing multiple commands on one command line, separate the commands with semicolons. $ date ; who Mon Sep 24 19:44:35 EST 2007 rich :0 2007-09-24 18:23 (console) rich pts/1 2007-09-24 18:24 rich pts/0 2007-09-24 18:42 barbara pts/2 2007-09-24 19:30 katie pts/3 2007-09-24 19:39 $ 2. Write the script file When writing a script file, always define the shell to be used in the first line as follows. $ touch test1 $gedit test1 #! /bin/bash # this is tes...
#Example
#Testing
#The
원문링크 : Chapter 6. Basic Shell Script writing