From: Emanuel Berg <moasenwood@zoho.eu>
To: zsh-users@zsh.org
Subject: infinite loop that is possible to quit
Date: Tue, 01 Dec 2020 02:50:10 +0100 [thread overview]
Message-ID: <875z5m9twt.fsf@zoho.eu> (raw)
How do I do an infinite loop that runs something, but it will
still be possible to quit the whole thing?
The best thing I've come up with is
while true; do
# run program
sleep 1
done
Then do, say, q to exit the program, and C-c during the sleep
period to quit the loop!
Is this good or bad?
TIA
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
next reply other threads:[~2020-12-01 1:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-01 1:50 Emanuel Berg [this message]
2020-12-01 7:36 ` Alex Satrapa
2020-12-01 9:53 ` Lewis Butler
2020-12-01 17:17 ` Daniel Shahaf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875z5m9twt.fsf@zoho.eu \
--to=moasenwood@zoho.eu \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).