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


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

[BUG] assignments preceding 'read' persist past command in POSIX mode

Started byMartijn Dekker <martijn@inlv.org>
First post2018-05-24 23:23 +0200
Last post2018-05-24 23:23 +0200
Articles 1 — 1 participant

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


Contents

  [BUG] assignments preceding 'read' persist past command in POSIX mode Martijn Dekker <martijn@inlv.org> - 2018-05-24 23:23 +0200

#14140 — [BUG] assignments preceding 'read' persist past command in POSIX mode

FromMartijn Dekker <martijn@inlv.org>
Date2018-05-24 23:23 +0200
Subject[BUG] assignments preceding 'read' persist past command in POSIX mode
Message-ID<mailman.421.1527197023.1292.bug-bash@gnu.org>
In bash-20180511 and bash-20180518 snapshots and in bash 5.0.0-alpha, in 
POSIX mode, assignments preceding 'read' incorrectly persist past the 
command. 'read' is a regular builtin so they should not persist.

$ ./bash -o posix -c 'v=ok; v=bug read x </dev/null; echo "$v"'
bug

This is especially problematic because IFS assignments persist too.

Thanks,

- M.

[toc] | [standalone]


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


csiph-web