Hi,
check_time()
{
fileName=$myFileName
newTime=$line
newtimeaccess="date --date \"$newTime 6 hour\" '+%Y-%m-%d %H:%M:%S'"
newtimeaccess=`echo $newtimeaccess | sh`
strnewtime=$(date -d "$newtimeaccess" +%s)
systime=$(date +%s)
if [ $systime -le $strnewtime ]
then
return "$fileName__0";
else
return "$fileName__1";
fi
}
value=`check_time "$myFileName $line"`
##$myFileName -- file name and $line -- time of file
echo $value;
It giving error return: : numeric argument required
How to solve It