我已经定义了一个带参数的函数
function expandSession()
{
line=$1;
....
}
如何使用参数调用此函数?
我试过了:
expandSession $line;
给出错误
expandSession: command not found
完整代码:
if [ ! -z "$HOMESERVER" ] ; then
....
while [[ "$START_DATE" -le "$END_DATE" ]];
do
zgrep ...; do
expandSession $line; <------
done
grep -e ...; do
expandSession $line; <------
done
let START_DATE+=86400;
done
fi
expandSession ()
{
line=$1;
}