add calc in bash function share