fix syntax errors and added some .gitignores

pull/1/merge
Adam Veldhousen 2015-01-13 19:55:24 -06:00
parent e781ed8bd0
commit e006ccc830
No known key found for this signature in database
GPG Key ID: A1927C43E8474A6E
2 changed files with 7 additions and 2 deletions

View File

@ -124,8 +124,8 @@ function calc() {
if [[ "$result" == *.* ]]; then if [[ "$result" == *.* ]]; then
# improve the output for decimal numbers # improve the output for decimal numbers
printf "$result" | printf "$result" |
sed -e 's/^\./0./' `# add "0" for cases like ".5"` \ sed -e 's/^\./0./' # add "0" for cases like ".5"` \
-e 's/^-\./-0./' `# add "0" for cases like "-.5"`\ -e 's/^-\./-0./' # add "0" for cases like "-.5"`\
-e 's/0*$//;s/\.$//'; # remove trailing zeros -e 's/0*$//;s/\.$//'; # remove trailing zeros
else else
printf "$result"; printf "$result";

5
.gitignore vendored
View File

@ -15,7 +15,9 @@ _*
.netrc .netrc
*.dll *.dll
tags tags
*.orig
.gnupg
# Directory # Directory
@ -45,3 +47,6 @@ Tools/vim/tutor/
.atom/packages .atom/packages
.cordova .cordova
.grunt-init .grunt-init
Tools/vim/vimrc
Tools/vim/vim74
Tools/cmder