From: zavandi <zavandi@gmail.com>
To: linux-newbie@vger.kernel.org
Subject: bash problem
Date: Tue, 1 Mar 2005 20:09:25 +0200 [thread overview]
Message-ID: <321aa0d20503011009d1b9060@mail.gmail.com> (raw)
I found some strange result. Here it is in its most simplified form I
can think of.
This command usually prints a few OKs, as expected:
for ((i=0; i< 100000; i++)); do if [ $RANDOM -eq 0 ]; then echo OK; fi; done
But this other command _never_ prints anything:
for ((i=0; i< 100000; i++)); do if [ $RANDOM -eq 0 ]; then echo OK;
fi; done | cat
Why?
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next reply other threads:[~2005-03-01 18:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-01 18:09 zavandi [this message]
2005-03-02 0:45 ` bash problem Conway S. Smith
2005-03-02 9:36 ` zavandi
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=321aa0d20503011009d1b9060@mail.gmail.com \
--to=zavandi@gmail.com \
--cc=linux-newbie@vger.kernel.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox