2019-10-29 18:22:19 +08:00
|
|
|
|
#!/usr/bin/env bash
|
2019-10-10 08:56:31 +08:00
|
|
|
|
|
2019-05-10 11:17:57 +08:00
|
|
|
|
# testing the $0 parameter
|
|
|
|
|
|
|
|
|
|
echo The command entered is $0
|
|
|
|
|
|
|
|
|
|
#当传给$0变量的真实字符串是整个脚本的路径是,程序中就会使用整个路径,而不仅仅是程序名
|
|
|
|
|
|
|
|
|
|
name=`basename $0`
|
|
|
|
|
echo The command entered is $name
|