All of lore.kernel.org
 help / color / mirror / Atom feed
From: zavandi <zavandi@gmail.com>
To: "Conway S. Smith" <beolach@comcast.net>, linux-newbie@vger.kernel.org
Subject: Re: bash problem
Date: Wed, 2 Mar 2005 11:36:09 +0200	[thread overview]
Message-ID: <321aa0d2050302013660343499@mail.gmail.com> (raw)
In-Reply-To: <42250CA7.6080103@comcast.net>

Conway S. Smith <beolach@comcast.net> wrote:
> [...]
> So, that means either I'm wrong and it's not something to do with the
> for loop being executed in a subshell, or else the bash script sets up
> the subshell's environment so that RANDOM works correctly.

It could very well be about the for loop being executed in a subshell,
but it's also about the particular number 0. If I replace "0" with "1"
(or any other 15-bit int) it works correctly.

> Anyway, good luck with whatever you're doing that needs this.

Actually, I was trying to find the maximum value for $RANDOM. Then I
read the man page and remembered I was never getting the minimum
value.
-
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

      reply	other threads:[~2005-03-02  9:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-01 18:09 bash problem zavandi
2005-03-02  0:45 ` Conway S. Smith
2005-03-02  9:36   ` zavandi [this message]

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=321aa0d2050302013660343499@mail.gmail.com \
    --to=zavandi@gmail.com \
    --cc=beolach@comcast.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.