5 ms·
FYI, you can make it shorter by using sleep in while's condition, no need for while true. It does delay the first output though. while sleep 1; do date; done |
by moehm 9y ago
FYI, you can make it shorter by using sleep in while's condition, no need for while true. It does delay the first output though.
while sleep 1; do date; done | ...
- _joel 9y agothanks for the tip, old habits die hard :)
- rounce 9y agoDoesn't the difference lie in whether you want to run the command then sleep, or sleep first and then run the command?
- jjwiseman 9y agoIf you want short while :...
- AdamJacobMuller 9y agothat's clever, i've never thought of it, interesting considering how many while true;do ...;sleep X;done loops i've done