DASH Shell discussions
 help / color / mirror / Atom feed
* eval and export behave differently together in dash and ash than in bash, zsh, and ksh
@ 2014-02-14 18:29 Dan Kegel
  2014-02-14 18:46 ` Eric Blake
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Kegel @ 2014-02-14 18:29 UTC (permalink / raw)
  To: dash

The script

eval export dir=~$LOGNAME
echo $dir

eval dir2=~$LOGNAME
echo $dir2

produces different results on different shells.

bash  (4.2-2ubuntu2.1) (with and without --posix)
zsh (4.3.17-1ubuntu1)
ksh (93u-1)
produce

/home/buildbot
/home/buildbot

dash (0.5.7-2ubuntu2)
ash (0.5.7-2ubuntu2)
produce

~buildbot
/home/buildbot

The easy workaround is to use the older form

eval dir=~$LOGNAME
export dir

but it'd be nice if that weren't needed.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-14 18:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-14 18:29 eval and export behave differently together in dash and ash than in bash, zsh, and ksh Dan Kegel
2014-02-14 18:46 ` Eric Blake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox