Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- text - 0.1655456615 - 0.158645 - 0.846554 - 0.85251 ##
- perl -pe 's/[-+]?d*(?:.?d|d.)d*(?:[eE][-+]?d+)?/sprintf("%.2g",$&)/ge'
- awk '{
- while (match($0, /[0-9]+.[0-9]+/)) {
- printf "%s%.2f", substr($0, 1, RSTART-1), substr($0, RSTART, RLENGTH)
- $0 = substr($0, RSTART+RLENGTH)
- }
- print
- }'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement