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

One of the things I do with : is infinite while-loops, like:

    while :; do
        <do stuff>
        sleep n
    done

Maybe to mainstream to make the cut!?


I prefer using "while true;" as that's easier to read. Arguably, it's less efficient due to calling the external "true".

Strangely though, I much prefer using the builtin "printf" to replace "echo" and "date", though the "date" usage is harder to read.




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

Search: