[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] eval
From: |
Wu Shuangrong |
Subject: |
[Help-bash] eval |
Date: |
Sat, 21 May 2016 20:31:07 +0800 |
let say:
$> a=‘one two three”
$> eval ‘b=$a’
$> printf “%s\n” “$b”
you will get “one two three”.
What’s confusing me is that why this is working this way. From my point of
view, after expansing, 'b=$a’ will become ‘b=one two three”, so the command
to be
evaluated is ‘b=one two three’, but there is not a command called two, so it
will fail. But it does not. So what’s happening here?
- [Help-bash] eval,
Wu Shuangrong <=