Reputation: 32787
I have defined a function that takes a parameter
function expandSession()
{
line=$1;
....
}
How can I call this function with a parameter?
I tried:
expandSession $line;
Giving error as
expandSession: command not found
Full code:
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;
}
Upvotes: 0
Views: 180