Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14603 > unrolled thread

Re: bash 4.4.19

Started byGreg Wooledge <wooledg@eeg.ccf.org>
First post2018-09-19 08:50 -0400
Last post2018-09-19 08:50 -0400
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: bash 4.4.19 Greg Wooledge <wooledg@eeg.ccf.org> - 2018-09-19 08:50 -0400

#14603 — Re: bash 4.4.19

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2018-09-19 08:50 -0400
SubjectRe: bash 4.4.19
Message-ID<mailman.984.1537361459.1284.bug-bash@gnu.org>
On Wed, Sep 19, 2018 at 08:38:59AM +0300, Евгений Мёдов wrote:
>    for i in {1..5}; do
>    A  A var${i}=$RANDOM
>    done

What you want is an array.  See <https://mywiki.wooledge.org/BashFAQ/005>.

for i in 1 2 3 4 5; do
  var[i]=$RANDOM
done

echo "${var[1]}"
declare -p var

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web