#!/bin/sh echo"The program's name is $0" echo"The first parameter is $1" echo"The second parameter is $2" echo"The parameter list is $*" echo"The user's home directory is $HOME" exit 0
在终端中输入:./ex_02.sh hello killua
执行结果:
The program's name is ./ex_02.sh The first parameter is hello The second parameter is killua The parameter list is hello killua The user's home directory is /home/killua