Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    $ echo -e '0001\n0010\n0002\n0' | bc
    1
    10
    2
    0


This is better relative to the `sed` solution as it handles the `0000` case well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: