How do I calculate values extracted from a file using grep and use those value to calculate