not getting right output,getting error "not recognised $age"
clear
echo -n "enter ur birth year " read byear cyear='date | tr -s ''| cut -d "" -f 6' age='expr $cyear - $byear' echo "ur $age" |
Is there a reason you don't just use:
Code:
cyear=$(date +%Y) Code:
age=$((cyear - byear)) |
thanks grail
|
All times are GMT -5. The time now is 02:27 PM. |