News for hackers. Stuff that matters.
Re:A shell colon does nothing. Use it anyway. by mandus on Sunday July 26, 2026 @11:29AM (#49059127)
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!?
Re:A shell colon does nothing. Use it anyway. by ndsipa_pomu on Sunday July 26, 2026 @11:42AM (#49059274)
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.