- 论坛徽章:
- 0
|
func_getPID4key()
{
typeset v_listFile1=`echo $1`
typeset v_listFile2="listFile2_clearall.tmp"
typeset v_key=`echo $2`
cat /dev/null > ${v_listFile2}
# 初始化全局变量:PID缓存列表变量
PID_LIST=""
PID_NUMBER=0
#echo "[test] v_listFile1"
#cat ${v_listFile1}
# 输入参数校验
if [ ! -f ${v_listFile1} ];then
PID_LIST="-1"
echo "internat error, v_listFile1=${v_listFile1}"
exit 1
fi
...
}
在这个函数运行时报错:报错行为“echo "internat error, v_listFile1=${v_listFile1}"” 错误信息为:“can only `return' from a function or sourced script” 请问是什么原因,多谢! |
|