Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- read -p "enter the date in the format YYYY-MM-DD "
- i=$(($(date +%Y)-${REPLY%%-*}))
- j=$(($(date +%m)-${REPLY:5:2}))
- k=$(($(date +%d)-${REPLY##*-}))
- if $i > 1 then assign l=$((i*365)) and else what?? # what about leap years?
- Using $j somehow assign m # confused before I've started
- Using $k somehow assign n # just as bad
- echo $((l+m+n))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement