Last active
January 3, 2016 08:19
-
-
Save coderofsalvation/8434902 to your computer and use it in GitHub Desktop.
removes decimals from number(strings)
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
| # removes decimals from number(strings) | |
| # usage: echo $(float2integer 1.02) (output: 1) | |
| # @param integer (piped) | |
| float2integer(){ | |
| printf "${1/\.*/}" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment