Created
October 2, 2014 15:55
-
-
Save nahakiole/26820cdfd2db216b1455 to your computer and use it in GitHub Desktop.
Add all numbers from a file seperated by line break
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat file | grep -Eo "[0-9]+" | tr '\n' '+' | rev | cut -c 2- | rev | bc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment