I have text file with entries like
123
112
3333
44
2
How to add these numbers and get the sum of these.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Example:
See also: Bash Programming Introduction, section on arithmetic evaluation
Another way would be to use
bc, an arbitrary precision calculator language:Paste usually works on lines, so we need
tr.